---
title: "Update a product image"
method: PUT
path: "/products/{product_id}/images/{id}"
---

# Update a product image

`PUT /products/{product_id}/images/{id}`

## Request

- Base URL: `https://api.ecommerceapi.uk/v1`
- URL: `https://api.ecommerceapi.uk/v1/products/{product_id}/images/{id}`
- Auth: HTTP basic

Updates an existing product image.

## Path parameters

- `product_id` integer, required
- `id` integer, required

## Request body

- ProductImageUpdate
  - `description` string: The updated ALT tag for the image.
  - `sortOrder` integer: The updated sort order for the product image.

## Response `200`

Product image updated successfully.

- ProductImage
  - `id` integer: Product image ID.
  - `url` string: Product image URL.
  - `description` string: The ALT tag for the product image.
  - `sortOrder` integer: Product image sort order.

---

[API](https://skmtc.dev/ecommerceapi/apis/product-images.md) - [All operations](https://skmtc.dev/ecommerceapi/apis/product-images/llms.txt) - [OpenAPI document](https://skmtc.dev/ecommerceapi/apis/product-images/revisions/f8458a17fe0c?raw)
