Skip to Content

Image

Represents an image, including its metadata, file information, and variant associations.

Type Definition

type Image { alt: String url: String title: String description: String tags: [String] aiProcessed: Boolean width: Int height: Int aspectRatio: String mimeType: String fileExtension: String fileSize: Int fileName: String orientation: String sortOrder: Int type: String attachedToVariant: Boolean variants: [ProductVariant] }

Fields

FieldTypeDescription
altStringThe alt text for the image, used for accessibility and SEO.
urlStringThe direct URL to the image file.
titleStringThe title of the image, often used as alt text.
descriptionStringThe description of the image, if available.
tags[String]The tags associated with the image.
aiProcessedBooleanIndicates whether the image has been processed by AI.
widthIntThe width of the image in pixels.
heightIntThe height of the image in pixels.
aspectRatioStringThe aspect ratio of the image, such as 16:9.
mimeTypeStringThe MIME type of the image file.
fileExtensionStringThe file extension of the image, such as jpg or png.
fileSizeIntThe size of the image file in bytes.
fileNameStringThe file name of the image.
orientationStringThe orientation of the image, such as landscape or portrait.
sortOrderIntThe sort order of the image among other images.
typeStringThe type of media, which is always ‘image’ for this drop.
attachedToVariantBooleanIndicates whether the image is attached to a product variant. Only available when accessed through product image or media methods.
variants[ProductVariant]The product variants this image is attached to. Only available when accessed through product image or media methods.

Relationships

The Image type is used to represent visual assets across multiple areas of the product catalog. It is referenced by ProductBundleContent as an image asset, by ProductOptionValue to visualize option selections, by Product as the featured image, and by ProductVariant for both standard and featured variant images. The variants field establishes a relationship to the ProductVariant type, indicating which variants the image is associated with.

Example

{ alt url title description tags aiProcessed width height aspectRatio mimeType fileExtension fileSize fileName orientation sortOrder type attachedToVariant variants { id } }

Implements

None