Skip to main content

ProductImage Object

Represents a product image.

type ProductImage {
id: ID!
alt: String
sortOrder: Int
url(size: Int, format: ThumbnailFormatEnum = ORIGINAL): String!
}

Fields​

id ● ID!​

The ID of the image.

alt ● String​

The alt text of the image.

sortOrder ● Int​

The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged.

url ● String!​

The URL of the image.

size ● Int​

Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).

format ● ThumbnailFormatEnum​

The format of the image. When not provided, format of the original image will be used.

Member Of​

Product object ● ProductVariant object