---
title: "Add a product image"
description: "Adds a JPEG or PNG image to a product from either uploaded image bytes or a public HTTPS image URL."
type: "mcp_operation"
company: "RevCent"
operation_id: "AddProductImage"
canonical: "https://revcent.com/documentation/markdown/mcp/operation/AddProductImage.md"
api_schema: "https://revcent.com/documentation/files/api/operation/AddProductImage.json"
---

# RevCent MCP Guide: `AddProductImage`

Adds a JPEG or PNG image to a product from either uploaded image bytes or a public HTTPS image URL. The image must be smaller than 1,000,000 bytes.

## Operation

- API: `POST /v2/products/{product_id}/images`
- Required permission: `product:edit`.
- Available profiles: MCP and AI Assistants.
- Related overview: [OverviewProductImage](https://revcent.com/documentation/markdown/mcp/operation/OverviewProductImage.md).

## Inputs

| Parameter | Location | Required | Meaning |
|---|---|---|---|
| `product_id` | URL path | Yes | The product that owns the image. IDs contain 20 characters. |

MCP arguments include these identifiers. In a direct HTTP request, substitute them into the URL; do not duplicate them in the JSON body.

Choose one API request representation:

| Content type | Request body |
|---|---|
| `application/json` | An object containing the required `image_url`. |
| `image/jpeg` | Raw JPEG bytes. |
| `image/png` | Raw PNG bytes. |

The image must be JPEG or PNG and smaller than 1,000,000 bytes. For the URL option, supply a public HTTPS image URL without embedded credentials. Private, loopback, and link-local destinations are not accepted.

For MCP JSON arguments, use `image_url` as shown below. The binary alternatives are HTTP request bodies, not JSON byte arrays, base64 strings, or data URLs. Only use a binary alternative through a client that explicitly supports that request representation; the schema's alternatives alone do not guarantee a particular MCP client's upload capability.

The JSON body accepts only `image_url`. After adding the image, use `EditProductImage` to set its caption or featured status.

## MCP argument example

```json
{
  "product_id": "PPPPPPPPPPPPPPPPPPPP",
  "image_url": "https://example.com/product-front.png"
}
```

IDs and the example URL are illustrative. Use the product ID and an image ID returned for that product; for uploads, substitute the actual public image URL.

## Result and next step

A successful response can include `product_id`, `product_image_id`, `result`, and API response metadata. When included, `product_image` contains the affected image's details. This mutation response differs from the flat GetProductImage detail response.

Use the returned `product_image_id` with [EditProductImage](https://revcent.com/documentation/markdown/mcp/operation/EditProductImage.md) to set a caption or featured status.

[OverviewProductImage](https://revcent.com/documentation/markdown/mcp/operation/OverviewProductImage.md) describes the image fields and lifecycle. API errors can include `code: 0`, `error_code`, `message`, and `result`; use the response to determine whether the request completed.


---
Document Parent Directory
* [Operations](https://revcent.com/documentation/markdown/mcp/operation/index.md) - AI/MCP details and overviews for operations available within the RevCent MCP.