Image object
Represents an image resource.
On this page
Connections
-
metafields (
MetafieldConnection!
)A paginated list of metafields associated with the resource.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Finds all metafields with a specific namespace under the resource.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
-
privateMetafields (
PrivateMetafieldConnection!
)List of private metafields.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Filter the private metafields by namespace.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
Fields
-
altText (
String
)A word or phrase to share the nature or contents of an image.
-
height (
Int
)The original height of the image in pixels. Returns
null
if the image is not hosted by Shopify. -
id (
ID
)A unique identifier for the image.
-
metafield (
Metafield
)The metafield associated with the resource.
-
originalSrc (
URL!
)The location of the original image as a URL.
If there are any existing transformations in the original source URL, they will remain and not be stripped.
-
privateMetafield (
PrivateMetafield
)Returns a private metafield found by namespace and key.
-
transformedSrc (
URL!
)The location of the transformed image as a URL.
All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. Otherwise any transformations which an image type does not support will be ignored.
Argument Description crop
(CropRegion
)Crops the image according to the specified region.
maxHeight
(Int
)Image height in pixels between 1 and 5760.
maxWidth
(Int
)Image width in pixels between 1 and 5760.
preferredContentType
(ImageContentType
)Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported).
scale
(Int
)Image size multiplier for high-resolution retina displays. Must be between 1 and 3.
Default value:1
-
width (
Int
)The original width of the image in pixels. Returns
null
if the image is not hosted by Shopify.
Types that return Image
-
App.banner
-
App.icon
-
App.screenshots
-
CalculatedDraftOrderLineItem.image
-
CalculatedLineItem.image
-
Collection.image
-
CommentEventAttachment.image
-
Customer.image
-
DeliveryCarrierService.icon
-
DiscountShareableUrl.targetItemImage
-
DraftOrderLineItem.image
-
LineItem.image
-
LineItemMutable.image
-
MediaImage.image
-
MediaPreviewImage.image
-
OrderTransaction.paymentIcon
-
PriceRuleShareableUrl.targetItemImage
-
Product.featuredImage
-
Product.images
-
ProductVariant.image
-
SearchResult.image
-
Shop.productImages
-
Shop.uploadedImages
-
Shop.uploadedImagesByIds
-
SubscriptionLine.variantImage
Implements
Deprecated fields
-
src (
URL!
) deprecatedThe location of the image as a URL.
Deprecation warning
Previously an image had a single
src
field. This could either return the original image location or a URL that contained transformations such as sizing or scale.These transformations were specified by arguments on the parent field.
Now an image has two distinct URL fields:
originalSrc
andtransformedSrc
.-
originalSrc
- the original unmodified image URL -
transformedSrc
- the image URL with the specified transformations included
To migrate to the new fields, image transformations should be moved from the parent field to
transformedSrc
.Before:
{ shop { productImages(maxWidth: 200, scale: 2) { edges { node { src } } } } }
After:
{ shop { productImages { edges { node { transformedSrc(maxWidth: 200, scale: 2) } } } } }
-
Represents an image resource.
On this page
Connections
-
metafields (
MetafieldConnection!
)A paginated list of metafields associated with the resource.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Finds all metafields with a specific namespace under the resource.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
-
privateMetafields (
PrivateMetafieldConnection!
)List of private metafields.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Filter the private metafields by namespace.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
Fields
-
altText (
String
)A word or phrase to share the nature or contents of an image.
-
height (
Int
)The original height of the image in pixels. Returns
null
if the image is not hosted by Shopify. -
id (
ID
)A unique identifier for the image.
-
metafield (
Metafield
)The metafield associated with the resource.
-
originalSrc (
URL!
)The location of the original image as a URL.
If there are any existing transformations in the original source URL, they will remain and not be stripped.
-
privateMetafield (
PrivateMetafield
)Returns a private metafield found by namespace and key.
-
transformedSrc (
URL!
)The location of the transformed image as a URL.
All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. Otherwise any transformations which an image type does not support will be ignored.
Argument Description crop
(CropRegion
)Crops the image according to the specified region.
maxHeight
(Int
)Image height in pixels between 1 and 5760.
maxWidth
(Int
)Image width in pixels between 1 and 5760.
preferredContentType
(ImageContentType
)Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported).
scale
(Int
)Image size multiplier for high-resolution retina displays. Must be between 1 and 3.
Default value:1
-
width (
Int
)The original width of the image in pixels. Returns
null
if the image is not hosted by Shopify.
Types that return Image
-
App.banner
-
App.icon
-
App.screenshots
-
CalculatedDraftOrderLineItem.image
-
CalculatedLineItem.image
-
Collection.image
-
CommentEventAttachment.image
-
Customer.image
-
DeliveryCarrierService.icon
-
DiscountShareableUrl.targetItemImage
-
DraftOrderLineItem.image
-
LineItem.image
-
LineItemMutable.image
-
MediaImage.image
-
MediaPreviewImage.image
-
OrderTransaction.paymentIcon
-
PriceRuleShareableUrl.targetItemImage
-
Product.featuredImage
-
Product.images
-
ProductVariant.image
-
SearchResult.image
-
Shop.productImages
-
Shop.uploadedImages
-
Shop.uploadedImagesByIds
-
SubscriptionLine.variantImage
Implements
Deprecated fields
-
src (
URL!
) deprecatedThe location of the image as a URL.
Deprecation warning
Previously an image had a single
src
field. This could either return the original image location or a URL that contained transformations such as sizing or scale.These transformations were specified by arguments on the parent field.
Now an image has two distinct URL fields:
originalSrc
andtransformedSrc
.-
originalSrc
- the original unmodified image URL -
transformedSrc
- the image URL with the specified transformations included
To migrate to the new fields, image transformations should be moved from the parent field to
transformedSrc
.Before:
{ shop { productImages(maxWidth: 200, scale: 2) { edges { node { src } } } } }
After:
{ shop { productImages { edges { node { transformedSrc(maxWidth: 200, scale: 2) } } } } }
-
Represents an image resource.
On this page
Connections
-
metafields (
MetafieldConnection!
)A paginated list of metafields associated with the resource.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Finds all metafields with a specific namespace under the resource.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
-
privateMetafields (
PrivateMetafieldConnection!
)List of private metafields.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Filter the private metafields by namespace.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
Fields
-
altText (
String
)A word or phrase to share the nature or contents of an image.
-
height (
Int
)The original height of the image in pixels. Returns
null
if the image is not hosted by Shopify. -
id (
ID
)A unique identifier for the image.
-
metafield (
Metafield
)The metafield associated with the resource.
-
originalSrc (
URL!
)The location of the original image as a URL.
If there are any existing transformations in the original source URL, they will remain and not be stripped.
-
privateMetafield (
PrivateMetafield
)Returns a private metafield found by namespace and key.
-
transformedSrc (
URL!
)The location of the transformed image as a URL.
All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. Otherwise any transformations which an image type does not support will be ignored.
Argument Description crop
(CropRegion
)Crops the image according to the specified region.
maxHeight
(Int
)Image height in pixels between 1 and 5760.
maxWidth
(Int
)Image width in pixels between 1 and 5760.
preferredContentType
(ImageContentType
)Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported).
scale
(Int
)Image size multiplier for high-resolution retina displays. Must be between 1 and 3.
Default value:1
-
width (
Int
)The original width of the image in pixels. Returns
null
if the image is not hosted by Shopify.
Types that return Image
-
App.banner
-
App.icon
-
App.screenshots
-
CalculatedDraftOrderLineItem.image
-
CalculatedLineItem.image
-
Collection.image
-
CommentEventAttachment.image
-
Customer.image
-
DeliveryCarrierService.icon
-
DiscountShareableUrl.targetItemImage
-
DraftOrderLineItem.image
-
LineItem.image
-
LineItemMutable.image
-
MediaImage.image
-
MediaPreviewImage.image
-
OrderTransaction.paymentIcon
-
PriceRuleShareableUrl.targetItemImage
-
Product.featuredImage
-
Product.images
-
ProductVariant.image
-
SearchResult.image
-
Shop.productImages
-
Shop.uploadedImages
-
Shop.uploadedImagesByIds
-
SubscriptionLine.variantImage
Implements
Deprecated fields
-
src (
URL!
) deprecatedThe location of the image as a URL.
Deprecation warning
Previously an image had a single
src
field. This could either return the original image location or a URL that contained transformations such as sizing or scale.These transformations were specified by arguments on the parent field.
Now an image has two distinct URL fields:
originalSrc
andtransformedSrc
.-
originalSrc
- the original unmodified image URL -
transformedSrc
- the image URL with the specified transformations included
To migrate to the new fields, image transformations should be moved from the parent field to
transformedSrc
.Before:
{ shop { productImages(maxWidth: 200, scale: 2) { edges { node { src } } } } }
After:
{ shop { productImages { edges { node { transformedSrc(maxWidth: 200, scale: 2) } } } } }
-
Represents an image resource.
On this page
Connections
-
metafields (
MetafieldConnection!
)A paginated list of metafields associated with the resource.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Finds all metafields with a specific namespace under the resource.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
-
privateMetafields (
PrivateMetafieldConnection!
)List of private metafields.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Filter the private metafields by namespace.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
Fields
-
altText (
String
)A word or phrase to share the nature or contents of an image.
-
height (
Int
)The original height of the image in pixels. Returns
null
if the image is not hosted by Shopify. -
id (
ID
)A unique identifier for the image.
-
metafield (
Metafield
)The metafield associated with the resource.
-
originalSrc (
URL!
)The location of the original image as a URL.
If there are any existing transformations in the original source URL, they will remain and not be stripped.
-
privateMetafield (
PrivateMetafield
)Returns a private metafield found by namespace and key.
-
transformedSrc (
URL!
)The location of the transformed image as a URL.
All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. Otherwise any transformations which an image type does not support will be ignored.
Argument Description crop
(CropRegion
)Crops the image according to the specified region.
maxHeight
(Int
)Image height in pixels between 1 and 5760.
maxWidth
(Int
)Image width in pixels between 1 and 5760.
preferredContentType
(ImageContentType
)Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported).
scale
(Int
)Image size multiplier for high-resolution retina displays. Must be between 1 and 3.
Default value:1
-
width (
Int
)The original width of the image in pixels. Returns
null
if the image is not hosted by Shopify.
Types that return Image
-
App.banner
-
App.icon
-
App.screenshots
-
CalculatedDraftOrderLineItem.image
-
CalculatedLineItem.image
-
Collection.image
-
CommentEventAttachment.image
-
Customer.image
-
DeliveryCarrierService.icon
-
DiscountShareableUrl.targetItemImage
-
DraftOrderLineItem.image
-
LineItem.image
-
LineItemMutable.image
-
MediaImage.image
-
MediaPreviewImage.image
-
OrderTransaction.paymentIcon
-
PriceRuleShareableUrl.targetItemImage
-
Product.featuredImage
-
Product.images
-
ProductVariant.image
-
SearchResult.image
-
Shop.productImages
-
Shop.uploadedImages
-
Shop.uploadedImagesByIds
-
SubscriptionLine.variantImage
Implements
Deprecated fields
-
src (
URL!
) deprecatedThe location of the image as a URL.
Deprecation warning
Previously an image had a single
src
field. This could either return the original image location or a URL that contained transformations such as sizing or scale.These transformations were specified by arguments on the parent field.
Now an image has two distinct URL fields:
originalSrc
andtransformedSrc
.-
originalSrc
- the original unmodified image URL -
transformedSrc
- the image URL with the specified transformations included
To migrate to the new fields, image transformations should be moved from the parent field to
transformedSrc
.Before:
{ shop { productImages(maxWidth: 200, scale: 2) { edges { node { src } } } } }
After:
{ shop { productImages { edges { node { transformedSrc(maxWidth: 200, scale: 2) } } } } }
-
Represents an image resource.
On this page
Connections
-
metafields (
MetafieldConnection!
)A paginated list of metafields associated with the resource.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Finds all metafields with a specific namespace under the resource.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
-
privateMetafields (
PrivateMetafieldConnection!
)List of private metafields.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Filter the private metafields by namespace.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
Fields
-
altText (
String
)A word or phrase to share the nature or contents of an image.
-
id (
ID
)A unique identifier for the image.
-
metafield (
Metafield
)The metafield associated with the resource.
-
originalSrc (
URL!
)The location of the original image as a URL.
If there are any existing transformations in the original source URL, they will remain and not be stripped.
-
privateMetafield (
PrivateMetafield
)Returns a private metafield found by namespace and key.
-
transformedSrc (
URL!
)The location of the transformed image as a URL.
All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. Otherwise any transformations which an image type does not support will be ignored.
Argument Description crop
(CropRegion
)Crops the image according to the specified region.
maxHeight
(Int
)Image height in pixels between 1 and 5760.
maxWidth
(Int
)Image width in pixels between 1 and 5760.
preferredContentType
(ImageContentType
)Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported).
scale
(Int
)Image size multiplier for high-resolution retina displays. Must be between 1 and 3.
Default value:1
Types that return Image
-
App.banner
-
App.icon
-
App.screenshots
-
CalculatedDraftOrderLineItem.image
-
CalculatedLineItem.image
-
Collection.image
-
CommentEventAttachment.image
-
Customer.image
-
DeliveryCarrierService.icon
-
DiscountShareableUrl.targetItemImage
-
DraftOrderLineItem.image
-
LineItem.image
-
LineItemMutable.image
-
MediaImage.image
-
MediaPreviewImage.image
-
OrderTransaction.paymentIcon
-
PriceRuleShareableUrl.targetItemImage
-
Product.featuredImage
-
Product.images
-
ProductVariant.image
-
SearchResult.image
-
Shop.productImages
-
Shop.uploadedImages
-
Shop.uploadedImagesByIds
Implements
Deprecated fields
-
src (
URL!
) deprecatedThe location of the image as a URL.
Deprecation warning
Previously an image had a single
src
field. This could either return the original image location or a URL that contained transformations such as sizing or scale.These transformations were specified by arguments on the parent field.
Now an image has two distinct URL fields:
originalSrc
andtransformedSrc
.-
originalSrc
- the original unmodified image URL -
transformedSrc
- the image URL with the specified transformations included
To migrate to the new fields, image transformations should be moved from the parent field to
transformedSrc
.Before:
{ shop { productImages(maxWidth: 200, scale: 2) { edges { node { src } } } } }
After:
{ shop { productImages { edges { node { transformedSrc(maxWidth: 200, scale: 2) } } } } }
-
Represents an image resource.
On this page
Connections
-
metafields (
MetafieldConnection!
)A paginated list of metafields associated with the resource.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Finds all metafields with a specific namespace under the resource.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
-
privateMetafields (
PrivateMetafieldConnection!
)List of private metafields.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Filter the private metafields by namespace.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
Fields
-
altText (
String
)A word or phrase to share the nature or contents of an image.
-
id (
ID
)A unique identifier for the image.
-
metafield (
Metafield
)The metafield associated with the resource.
-
originalSrc (
URL!
)The location of the original image as a URL.
If there are any existing transformations in the original source URL, they will remain and not be stripped.
-
privateMetafield (
PrivateMetafield
)Returns a private metafield found by namespace and key.
-
transformedSrc (
URL!
)The location of the transformed image as a URL.
All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. Otherwise any transformations which an image type does not support will be ignored.
Argument Description crop
(CropRegion
)Crops the image according to the specified region.
maxHeight
(Int
)Image height in pixels between 1 and 5760.
maxWidth
(Int
)Image width in pixels between 1 and 5760.
preferredContentType
(ImageContentType
)Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported).
scale
(Int
)Image size multiplier for high-resolution retina displays. Must be between 1 and 3.
Default value:1
Types that return Image
-
App.banner
-
App.icon
-
App.screenshots
-
CalculatedDraftOrderLineItem.image
-
CalculatedLineItem.image
-
Collection.image
-
CommentEventAttachment.image
-
Customer.image
-
DeliveryCarrierService.icon
-
DraftOrderLineItem.image
-
LineItem.image
-
LineItemMutable.image
-
MediaImage.image
-
MediaPreviewImage.image
-
OrderTransaction.paymentIcon
-
PriceRuleShareableUrl.targetItemImage
-
Product.featuredImage
-
Product.images
-
ProductVariant.image
-
SearchResult.image
-
Shop.productImages
-
Shop.uploadedImages
-
Shop.uploadedImagesByIds
Implements
Deprecated fields
-
src (
URL!
) deprecatedThe location of the image as a URL.
Deprecation warning
Previously an image had a single
src
field. This could either return the original image location or a URL that contained transformations such as sizing or scale.These transformations were specified by arguments on the parent field.
Now an image has two distinct URL fields:
originalSrc
andtransformedSrc
.-
originalSrc
- the original unmodified image URL -
transformedSrc
- the image URL with the specified transformations included
To migrate to the new fields, image transformations should be moved from the parent field to
transformedSrc
.Before:
{ shop { productImages(maxWidth: 200, scale: 2) { edges { node { src } } } } }
After:
{ shop { productImages { edges { node { transformedSrc(maxWidth: 200, scale: 2) } } } } }
-
Represents an image resource.
On this page
Connections
-
metafields (
MetafieldConnection!
)A paginated list of metafields associated with the resource.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Finds all metafields with a specific namespace under the resource.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
-
privateMetafields (
PrivateMetafieldConnection!
)List of private metafields.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Filter the private metafields by namespace.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
Fields
-
altText (
String
)A word or phrase to share the nature or contents of an image.
-
id (
ID
)A unique identifier for the image.
-
metafield (
Metafield
)The metafield associated with the resource.
-
originalSrc (
URL!
)The location of the original image as a URL.
If there are any existing transformations in the original source URL, they will remain and not be stripped.
-
privateMetafield (
PrivateMetafield
)Returns a private metafield found by namespace and key.
-
transformedSrc (
URL!
)The location of the transformed image as a URL.
All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. Otherwise any transformations which an image type does not support will be ignored.
Argument Description crop
(CropRegion
)Crops the image according to the specified region.
maxHeight
(Int
)Image height in pixels between 1 and 5760.
maxWidth
(Int
)Image width in pixels between 1 and 5760.
preferredContentType
(ImageContentType
)Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported).
scale
(Int
)Image size multiplier for high-resolution retina displays. Must be between 1 and 3.
Default value:1
Types that return Image
-
App.banner
-
App.icon
-
App.screenshots
-
CalculatedDraftOrderLineItem.image
-
CalculatedLineItem.image
-
Collection.image
-
CommentEventAttachment.image
-
Customer.image
-
DeliveryCarrierService.icon
-
DraftOrderLineItem.image
-
LineItem.image
-
LineItemMutable.image
-
MediaImage.image
-
MediaPreviewImage.image
-
OrderTransaction.paymentIcon
-
PriceRuleShareableUrl.targetItemImage
-
Product.featuredImage
-
Product.images
-
ProductVariant.image
-
SearchResult.image
-
Shop.productImages
-
Shop.uploadedImages
-
Shop.uploadedImagesByIds
Implements
Deprecated fields
-
src (
URL!
) deprecatedThe location of the image as a URL.
Deprecation warning
Previously an image had a single
src
field. This could either return the original image location or a URL that contained transformations such as sizing or scale.These transformations were specified by arguments on the parent field.
Now an image has two distinct URL fields:
originalSrc
andtransformedSrc
.-
originalSrc
- the original unmodified image URL -
transformedSrc
- the image URL with the specified transformations included
To migrate to the new fields, image transformations should be moved from the parent field to
transformedSrc
.Before:
{ shop { productImages(maxWidth: 200, scale: 2) { edges { node { src } } } } }
After:
{ shop { productImages { edges { node { transformedSrc(maxWidth: 200, scale: 2) } } } } }
-
Represents an image resource.
On this page
Connections
-
metafields (
MetafieldConnection!
)A paginated list of metafields associated with the resource.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Finds all metafields with a specific namespace under the resource.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
-
privateMetafields (
PrivateMetafieldConnection!
)List of private metafields.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Filter the private metafields by namespace.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
Fields
-
altText (
String
)A word or phrase to share the nature or contents of an image.
-
id (
ID
)A unique identifier for the image.
-
metafield (
Metafield
)The metafield associated with the resource.
-
originalSrc (
URL!
)The location of the original image as a URL.
If there are any existing transformations in the original source URL, they will remain and not be stripped.
-
privateMetafield (
PrivateMetafield
)Returns a private metafield found by namespace and key.
-
transformedSrc (
URL!
)The location of the transformed image as a URL.
All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. Otherwise any transformations which an image type does not support will be ignored.
Argument Description crop
(CropRegion
)Crops the image according to the specified region.
maxHeight
(Int
)Image height in pixels between 1 and 5760.
maxWidth
(Int
)Image width in pixels between 1 and 5760.
preferredContentType
(ImageContentType
)Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported).
scale
(Int
)Image size multiplier for high-resolution retina displays. Must be between 1 and 3.
Default value:1
Types that return Image
-
App.banner
-
App.icon
-
App.screenshots
-
CalculatedDraftOrderLineItem.image
-
CalculatedLineItem.image
-
Collection.image
-
CommentEventAttachment.image
-
Customer.image
-
DeliveryCarrierService.icon
-
DraftOrderLineItem.image
-
LineItem.image
-
LineItemMutable.image
-
MediaImage.image
-
MediaPreviewImage.image
-
OrderTransaction.paymentIcon
-
PriceRuleShareableUrl.targetItemImage
-
Product.featuredImage
-
Product.images
-
ProductVariant.image
-
SearchResult.image
-
Shop.productImages
-
Shop.uploadedImages
-
Shop.uploadedImagesByIds
Implements
Deprecated fields
-
src (
URL!
) deprecatedThe location of the image as a URL.
Deprecation warning
Previously an image had a single
src
field. This could either return the original image location or a URL that contained transformations such as sizing or scale.These transformations were specified by arguments on the parent field.
Now an image has two distinct URL fields:
originalSrc
andtransformedSrc
.-
originalSrc
- the original unmodified image URL -
transformedSrc
- the image URL with the specified transformations included
To migrate to the new fields, image transformations should be moved from the parent field to
transformedSrc
.Before:
{ shop { productImages(maxWidth: 200, scale: 2) { edges { node { src } } } } }
After:
{ shop { productImages { edges { node { transformedSrc(maxWidth: 200, scale: 2) } } } } }
-
Represents an image resource.
On this page
Connections
-
metafields (
MetafieldConnection!
)A paginated list of metafields associated with the resource.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Finds all metafields with a specific namespace under the resource.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
-
privateMetafields (
PrivateMetafieldConnection!
)List of private metafields.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Filter the private metafields by namespace.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
Fields
-
altText (
String
)A word or phrase to share the nature or contents of an image.
-
id (
ID
)A unique identifier for the image.
-
metafield (
Metafield
)The metafield associated with the resource.
-
originalSrc (
URL!
)The location of the original image as a URL.
If there are any existing transformations in the original source URL, they will remain and not be stripped.
-
privateMetafield (
PrivateMetafield
)Returns a private metafield found by namespace and key.
-
transformedSrc (
URL!
)The location of the transformed image as a URL.
All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. Otherwise any transformations which an image type does not support will be ignored.
Argument Description crop
(CropRegion
)Crops the image according to the specified region.
maxHeight
(Int
)Image height in pixels between 1 and 5760.
maxWidth
(Int
)Image width in pixels between 1 and 5760.
preferredContentType
(ImageContentType
)Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported).
scale
(Int
)Image size multiplier for high-resolution retina displays. Must be between 1 and 3.
Default value:1
Types that return Image
-
App.banner
-
App.icon
-
App.screenshots
-
CalculatedDraftOrderLineItem.image
-
CalculatedLineItem.image
-
Collection.image
-
CommentEventAttachment.image
-
Customer.image
-
DeliveryCarrierService.icon
-
DraftOrderLineItem.image
-
LineItem.image
-
LineItemMutable.image
-
MediaImage.image
-
MediaPreviewImage.image
-
OrderTransaction.paymentIcon
-
PriceRuleShareableUrl.targetItemImage
-
Product.featuredImage
-
Product.images
-
ProductVariant.image
-
SearchResult.image
-
Shop.productImages
-
Shop.uploadedImages
-
Shop.uploadedImagesByIds
Implements
Deprecated fields
-
src (
URL!
) deprecatedThe location of the image as a URL.
Deprecation warning
Previously an image had a single
src
field. This could either return the original image location or a URL that contained transformations such as sizing or scale.These transformations were specified by arguments on the parent field.
Now an image has two distinct URL fields:
originalSrc
andtransformedSrc
.-
originalSrc
- the original unmodified image URL -
transformedSrc
- the image URL with the specified transformations included
To migrate to the new fields, image transformations should be moved from the parent field to
transformedSrc
.Before:
{ shop { productImages(maxWidth: 200, scale: 2) { edges { node { src } } } } }
After:
{ shop { productImages { edges { node { transformedSrc(maxWidth: 200, scale: 2) } } } } }
-
Represents an image resource.
On this page
Connections
-
metafields (
MetafieldConnection!
)A paginated list of metafields associated with the resource.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Finds all metafields with a specific namespace under the resource.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
-
privateMetafields (
PrivateMetafieldConnection!
)List of private metafields.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Filter the private metafields by namespace.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
Fields
-
altText (
String
)A word or phrase to share the nature or contents of an image.
-
id (
ID
)A unique identifier for the image.
-
metafield (
Metafield
)The metafield associated with the resource.
-
originalSrc (
URL!
)The location of the original image as a URL.
If there are any existing transformations in the original source URL, they will remain and not be stripped.
-
privateMetafield (
PrivateMetafield
)Returns a private metafield found by namespace and key.
-
transformedSrc (
URL!
)The location of the transformed image as a URL.
All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. Otherwise any transformations which an image type does not support will be ignored.
Argument Description crop
(CropRegion
)Crops the image according to the specified region.
maxHeight
(Int
)Image height in pixels between 1 and 5760.
maxWidth
(Int
)Image width in pixels between 1 and 5760.
preferredContentType
(ImageContentType
)Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported).
scale
(Int
)Image size multiplier for high-resolution retina displays. Must be between 1 and 3.
Default value:1
Types that return Image
-
App.banner
-
App.icon
-
App.screenshots
-
CalculatedDraftOrderLineItem.image
-
CalculatedLineItem.image
-
Collection.image
-
CommentEventAttachment.image
-
Customer.image
-
DeliveryCarrierService.icon
-
DraftOrderLineItem.image
-
LineItem.image
-
LineItemMutable.image
-
MediaImage.image
-
MediaPreviewImage.image
-
OrderTransaction.paymentIcon
-
PriceRuleShareableUrl.targetItemImage
-
Product.featuredImage
-
Product.images
-
ProductVariant.image
-
SearchResult.image
-
Shop.productImages
-
Shop.uploadedImages
-
Shop.uploadedImagesByIds
Implements
Deprecated fields
-
src (
URL!
) deprecatedThe location of the image as a URL.
Deprecation warning
Previously an image had a single
src
field. This could either return the original image location or a URL that contained transformations such as sizing or scale.These transformations were specified by arguments on the parent field.
Now an image has two distinct URL fields:
originalSrc
andtransformedSrc
.-
originalSrc
- the original unmodified image URL -
transformedSrc
- the image URL with the specified transformations included
To migrate to the new fields, image transformations should be moved from the parent field to
transformedSrc
.Before:
{ shop { productImages(maxWidth: 200, scale: 2) { edges { node { src } } } } }
After:
{ shop { productImages { edges { node { transformedSrc(maxWidth: 200, scale: 2) } } } } }
-
Represents an image resource.
On this page
Connections
-
metafields (
MetafieldConnection!
)A paginated list of metafields associated with the resource.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Finds all metafields with a specific namespace under the resource.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
-
privateMetafields (
PrivateMetafieldConnection!
)List of private metafields.
Argument Description after
(String
)Returns the elements that come after the specified cursor.
before
(String
)Returns the elements that come before the specified cursor.
first
(Int
)Returns up to the first
n
elements from the list.last
(Int
)Returns up to the last
n
elements from the list.namespace
(String
)Filter the private metafields by namespace.
reverse
(Boolean
)Reverse the order of the underlying list.
Default value:false
Fields
-
altText (
String
)A word or phrase to share the nature or contents of an image.
-
id (
ID
)A unique identifier for the image.
-
metafield (
Metafield
)The metafield associated with the resource.
-
originalSrc (
URL!
)The location of the original image as a URL.
If there are any existing transformations in the original source URL, they will remain and not be stripped.
-
privateMetafield (
PrivateMetafield
)Returns a private metafield found by namespace and key.
-
transformedSrc (
URL!
)The location of the transformed image as a URL.
All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. Otherwise any transformations which an image type does not support will be ignored.
Argument Description crop
(CropRegion
)Crops the image according to the specified region.
maxHeight
(Int
)Image height in pixels between 1 and 5760.
maxWidth
(Int
)Image width in pixels between 1 and 5760.
preferredContentType
(ImageContentType
)Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported).
scale
(Int
)Image size multiplier for high-resolution retina displays. Must be between 1 and 3.
Default value:1
Types that return Image
-
App.banner
-
App.icon
-
App.screenshots
-
CalculatedDraftOrderLineItem.image
-
CalculatedLineItem.image
-
Collection.image
-
CommentEventAttachment.image
-
Customer.image
-
DeliveryCarrierService.icon
-
DraftOrderLineItem.image
-
LineItem.image
-
LineItemMutable.image
-
MediaImage.image
-
MediaPreviewImage.image
-
OrderTransaction.paymentIcon
-
PriceRuleShareableUrl.targetItemImage
-
Product.featuredImage
-
Product.images
-
ProductVariant.image
-
SearchResult.image
-
Shop.productImages
-
Shop.uploadedImages
-
Shop.uploadedImagesByIds
Implements
Deprecated fields
-
src (
URL!
) deprecatedThe location of the image as a URL.
Deprecation warning
Previously an image had a single
src
field. This could either return the original image location or a URL that contained transformations such as sizing or scale.These transformations were specified by arguments on the parent field.
Now an image has two distinct URL fields:
originalSrc
andtransformedSrc
.-
originalSrc
- the original unmodified image URL -
transformedSrc
- the image URL with the specified transformations included
To migrate to the new fields, image transformations should be moved from the parent field to
transformedSrc
.Before:
{ shop { productImages(maxWidth: 200, scale: 2) { edges { node { src } } } } }
After:
{ shop { productImages { edges { node { transformedSrc(maxWidth: 200, scale: 2) } } } } }
-