Image
Represents an image resource.
Anchor to FieldsFields
- Anchor to altTextalt•String
Text A word or phrase to share the nature or contents of an image.
- Anchor to heightheight•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.
- •URL!non-nullPre-auth accessible
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.
- Anchor to transformtransform•Image
Transform Input A set of options to transform the original image.
Arguments
- Anchor to widthwidth•Int
The original width of the image in pixels. Returns
null
if the image isn't hosted by Shopify.
Deprecated fields
- Anchor to originalSrcoriginal•URL!
Src - •URL!
- Anchor to transformedSrctransformed•URL!
Src - Anchor to maxWidthmax•Int
Width Image width in pixels between 1 and 5760.
- Anchor to maxHeightmax•Int
Height Image height in pixels between 1 and 5760.
- Anchor to cropcrop•Crop
Region Crops the image according to the specified region.
- Anchor to scalescale•IntDefault:1
Image size multiplier for high-resolution retina displays. Must be between 1 and 3.
- Anchor to preferredContentTypepreferred•Image
Content Type Content Type Best effort conversion of image into content type (SVG -> PNG, Anything -> JPG, Anything -> WEBP are supported).
Arguments