Skip to main content
object

Represents an image resource.

•String

A word or phrase to share the nature or contents of an image.

•Int

The original height of the image in pixels. Returns null if the image isn't hosted by Shopify.

•ID

A unique ID for the image.

•Metafield

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

Arguments

•String

The container the metafield belongs to. If omitted, the app-reserved namespace will be used.

•String!
required

The key for the metafield.


•MetafieldConnection!
non-null

A list of custom fields that a merchant associates with a Shopify resource.

Arguments

•String

The metafield namespace to filter by. If omitted, all metafields are returned.

•[String!]

List of keys of metafields in the format namespace.key, will be returned in the same format.

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•String

The ThumbHash of the image.

Useful to display placeholder images while the original image is loading.

•[Translation!]!
non-null

The published translations associated with the resource.

Arguments

•String!
required

Filters translations locale.

•ID

Filters translations by market ID. Use this argument to retrieve content specific to a market.


•URL!
non-null

The location of the image as a URL.

If no transform options are specified, then the original image will be preserved including any pre-applied transforms.

All transformation options are considered "best-effort". Any transformation that the original image type doesn't support will be ignored.

If you need multiple variations of the same image, then you can use GraphQL aliases.

Arguments

•ImageTransformInput

A set of options to transform the original image.


•Int

The original width of the image in pixels. Returns null if the image isn't hosted by Shopify.

Deprecated fields

•URL!
non-nullDeprecated
•URL!
non-nullDeprecated
•URL!
non-nullDeprecated

Arguments

•Int

Image width in pixels between 1 and 5760.

•Int

Image height in pixels between 1 and 5760.

•CropRegion

Crops the image according to the specified region.

•Int
Default:1

Image size multiplier for high-resolution retina displays. Must be between 1 and 3.

Anchor to preferredContentTypepreferredContentType
•ImageContentType

Best effort conversion of image into content type (SVG -> PNG, Anything -> JPG, Anything -> WEBP are supported).



Was this section helpful?