---
title: Image - Customer API
description: Represents an image resource.
api_version: unstable
api_name: customer
source_url:
  html: 'https://shopify.dev/docs/api/customer/unstable/objects/Image'
  md: 'https://shopify.dev/docs/api/customer/unstable/objects/Image.md'
---

# Image

object

Represents an image resource.

## Fields

* alt​Text

  [String](https://shopify.dev/docs/api/customer/unstable/scalars/String)

  [Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

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

* height

  [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

  [Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

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

* id

  [ID](https://shopify.dev/docs/api/customer/unstable/scalars/ID)

  [Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

  A unique ID for the image.

* thumbhash

  [String](https://shopify.dev/docs/api/customer/unstable/scalars/String)

  [Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

  The ThumbHash of the image.

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

* url

  [URL!](https://shopify.dev/docs/api/customer/unstable/scalars/URL)

  non-null[Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

  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](https://graphql.org/learn/queries/#aliases).

  * transform

    [Image​Transform​Input](https://shopify.dev/docs/api/customer/unstable/input-objects/ImageTransformInput)

    ### Arguments

    A set of options to transform the original image.

  ***

* width

  [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

  [Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

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

### Deprecated fields

* original​Src

  [URL!](https://shopify.dev/docs/api/customer/unstable/scalars/URL)

  non-nullDeprecated[Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

* src

  [URL!](https://shopify.dev/docs/api/customer/unstable/scalars/URL)

  non-nullDeprecated[Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

* transformed​Src

  [URL!](https://shopify.dev/docs/api/customer/unstable/scalars/URL)

  non-nullDeprecated[Pre-auth accessible](https://shopify.dev/docs/apps/build/customer-accounts/order-status-page#customer-account-api)

  * max​Width

    [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

    ### Arguments

    Image width in pixels between 1 and 5760.

  * max​Height

    [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

    Image height in pixels between 1 and 5760.

  * crop

    [Crop​Region](https://shopify.dev/docs/api/customer/unstable/enums/CropRegion)

    Crops the image according to the specified region.

  * scale

    [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

    Default:1

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

  * preferred​Content​Type

    [Image​Content​Type](https://shopify.dev/docs/api/customer/unstable/enums/ImageContentType)

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

  ***

***

## Map

### Fields with this object

* [DraftOrderLineItem.image](https://shopify.dev/docs/api/customer/unstable/objects/DraftOrderLineItem#field-DraftOrderLineItem.fields.image)
* [ExchangeLineItem.image](https://shopify.dev/docs/api/customer/unstable/objects/ExchangeLineItem#field-ExchangeLineItem.fields.image)
* [GenericFile.previewImage](https://shopify.dev/docs/api/customer/unstable/objects/GenericFile#field-GenericFile.fields.previewImage)
* [LineItem.image](https://shopify.dev/docs/api/customer/unstable/objects/LineItem#field-LineItem.fields.image)
* [LineItemGroup.image](https://shopify.dev/docs/api/customer/unstable/objects/LineItemGroup#field-LineItemGroup.fields.image)
* [Media.previewImage](https://shopify.dev/docs/api/customer/unstable/interfaces/Media#fields-previewImage)
* [MediaImage.image](https://shopify.dev/docs/api/customer/unstable/objects/MediaImage#field-MediaImage.fields.image)
* [MediaImage.previewImage](https://shopify.dev/docs/api/customer/unstable/objects/MediaImage#field-MediaImage.fields.previewImage)
* [Model3d.previewImage](https://shopify.dev/docs/api/customer/unstable/objects/Model3d#field-Model3d.fields.previewImage)
* [SubscriptionLine.image](https://shopify.dev/docs/api/customer/unstable/objects/SubscriptionLine#field-SubscriptionLine.fields.image)
* [SubscriptionLine.variantImage](https://shopify.dev/docs/api/customer/unstable/objects/SubscriptionLine#field-SubscriptionLine.fields.variantImage)
* [Video.previewImage](https://shopify.dev/docs/api/customer/unstable/objects/Video#field-Video.fields.previewImage)
