productImageUpdate mutation

Version unstable

Updates an image of a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
image ( ImageInput! ) required

Image to be updated.

productId ( ID! ) required

The ID of the product on which to update the image.

ImageInput fields

  • altText (String)

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

  • id (ID)

    Globally unique identifier.

  • src (String)

    The URL of the image. May be a signed upload URL.

Return fields

  • image (Image)

    Image updated.

    Argument Description
    crop ( CropRegion )

    Crops the image according to the specified region. This argument is deprecated: Use crop on Image.transformedSrc instead.

    maxHeight ( Int )

    Image height in pixels between 1 and 2048. This argument is deprecated: Use maxHeight on Image.transformedSrc instead.

    maxWidth ( Int )

    Image width in pixels between 1 and 2048. This argument is deprecated: Use maxWidth on Image.transformedSrc instead.

    scale ( Int )

    Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use scale on Image.transformedSrc instead.
    Default value: 1

  • userErrors ([UserError!]!)

    List of errors that occurred from executing the mutation.

Version 2021-10 (Release candidate)

Updates an image of a product.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompletin