Skip to main content

<Image>

Category: Object tag

The Image tag shows an image on the page. Use for all image annotation tasks to display an image on the labeling interface.

Use with the following data types: images.

When you annotate image regions with this tag, the annotations are saved as percentages of the original size of the image, from 0-100.

Attributes​

AttributeTypeRequiredDefaultDescription
namestringyes—Name of the element
valuestringyes—Data field containing a path or URL to the image
valueListstringno—References a variable that holds a list of image URLs. For an example, see the templates gallery.
smoothingtrue,falseno—Enable smoothing, by default it uses user settings
widthstringno100%Image width
maxWidthstringno750pxMaximum image width
zoomtrue,falsenofalseEnable zooming an image with the mouse wheel
negativeZoomtrue,falsenofalseEnable zooming out an image
zoomByfloatno1.1Scale factor
gridtrue,falsenofalseWhether to show a grid
gridSizenumberno30Specify size of the grid
gridColorstringno#EEEEF4Color of the grid in hex, opacity is 0.15
zoomControltrue,falsenofalseShow zoom controls in toolbar
brightnessControltrue,falsenofalseShow brightness control in toolbar
contrastControltrue,falsenofalseShow contrast control in toolbar
rotateControltrue,falsenofalseShow rotate control in toolbar
crosshairtrue,falsenofalseShow crosshair cursor
horizontalAlignmentleft,center,rightnoleftWhere to align image horizontally. Can be one of "left", "center", or "right"
verticalAlignmenttop,center,bottomnotopWhere to align image vertically. Can be one of "top", "center", or "bottom"
defaultZoomauto,original,fitnofitSpecify the initial zoom of the image within the viewport while preserving its ratio. Can be one of "auto", "original", or "fit"
crossOriginnone,anonymous,use-credentialsnononeConfigures CORS cross domain behavior for this image, either "none", "anonymous", or "use-credentials", similar to DOM img crossOrigin property.

Examples​

Labeling configuration to display an image on the labeling interface​

<View>
<!-- Retrieve the image url from the url field in JSON or column in CSV -->
<Image name="image" value="$url" rotateControl="true" zoomControl="true"></Image>
</View>

Labeling configuration to perform multi-image segmentation​

<View>
<!-- Retrieve the image url from the url field in JSON or column in CSV -->
<Image name="image" valueList="$images" rotateControl="true" zoomControl="true"></Image>
</View>
<!-- {
"data": {
"images": [
"https://images.unsplash.com/photo-1556740734-7f3a7d7f0f9c?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1950&q=80",
"https://images.unsplash.com/photo-1556740734-7f3a7d7f0f9c?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1950&q=80",
]
}
} -->