import { ShopifyImage } from '@daffodil/driver/shopify'
An image resource with URL, dimensions, and transformation options. Used for product images, collection images, media previews, and other visual content throughout the storefront.
The url field accepts an ImageTransformInput argument for resizing, cropping, scaling for retina displays, and converting between image formats. Use the thumbhash field to display lightweight placeholders while images load.
interface ShopifyImage {
__typename: "Image"
altText: string
height: number
id: string
originalSrc: Scalars['URL']['output']
src: Scalars['URL']['output']
transformedSrc: Scalars['URL']['output']
url: Scalars['URL']['output']
width: number
}
__typename "Image" |
|---|
altText string |
|---|
A word or phrase to share the nature or contents of an image. |
height number |
|---|
The original height of the image in pixels. Returns |
id string |
|---|
A unique ID for the image. |
originalSrc Scalars['URL']['output'] |
|---|
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. |
src Scalars['URL']['output'] |
|---|
The location of the image as a URL. |
transformedSrc Scalars['URL']['output'] |
|---|
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 doesn't support will be ignored. |
url Scalars['URL']['output'] |
|---|
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. |
width number |
|---|
The original width of the image in pixels. Returns |