# ImageCollection Object

> Contains all images of a Text Control document or part of the document.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Object
- **Introduced:** 28.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > ImageCollection Object
- **967 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/llms-full.txt

---

### Description

Contains all [images](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/image/llms-full.txt) of a Text Control document or part of the document.

### Syntax

```javascript
ImageCollection
```

### Examples

The following example demonstrates `ImageCollection` in a practical document-editing workflow. It contains all images of a Text Control document or part of the document.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.images.getItem(
    function(image) {
        if (!image) {
            console.warn("No image was returned.");
            return;
        }
        
        console.log("get item result:", image);
    },
    onTxError,
    25
);
```

---

## In This Section

- [Javascript: ImageCollection.addAnchored Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/addanchored-method/llms-full.txt): Creates and inserts a new image which is anchored to the specified text position. It has the specified horizontal alignment and a textflow which is given through the insertionMode parameter. Anchored image are moved with the text.
- [Javascript: ImageCollection.addAnchoredAtLocation Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/addanchoredatlocation-method/llms-full.txt): Inserts a new image which is anchored to the specified text position. It has the specified location relative to the paragraph it is anchored to and a textflow which is given through the insertionMode parameter. Anchored images are moved with the text.
- [Javascript: ImageCollection.addAtFixedPosition Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/addatfixedposition-method/llms-full.txt): Obsolete. This method will be removed in one of the next versions. Inserts a new image which has a fixed geometrical position in the document. This position is specified through a page number and a location on this page.
- [Javascript: ImageCollection.addAtFixedPositionInDocument Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/addatfixedpositionindocument-method/llms-full.txt): Creates and inserts a new image which has a fixed geometrical position in the document. This position is specified through a location relative to the top left corner of the complete document. All gaps between the pages must be included.
- [Javascript: ImageCollection.addAtFixedPositionOnPage Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/addatfixedpositiononpage-method/llms-full.txt): Inserts a new image which has a fixed geometrical position in the document. This position is specified through a page number and a location on this page.
- [Javascript: ImageCollection.addInline Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/addinline-method/llms-full.txt): Creates and inserts a new image inline, which means that it is treated in the text like a single character. The image is inserted at the specified text input position.
- [Javascript: ImageCollection.getItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/getitem-method/llms-full.txt): Gets the image selected by the user or the image with the specified identifier.
- [Javascript: ImageCollection.getItemByName Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/getitembyname-method/llms-full.txt): Gets the image with the specified name.
- [Javascript: ImageCollection.remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/remove-method/llms-full.txt): Removes an image from a Text Control document.

---

## Nearby

- **Previous:** [ImageCallback Function](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecallback/llms-full.txt)
- **Next:** [Javascript: ImageCollection.addAnchored Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/imagecollection/addanchored-method/llms-full.txt)
