> ## Documentation Index
> Fetch the complete documentation index at: https://andcze.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding images

> Uploading, compressing, and managing shop images.

The ItemShop dashboard uploads product images, logos, favicons, and editor graphics directly to the shop's storage. The backend validates, compresses, and converts files to WebP, strips metadata, and stores the result in the configured Cloudflare R2/CDN.

## Uploading in the dashboard

<Steps>
  <Step title="Choose a file">
    Click **Upload** in a product form or the editor. The dashboard accepts PNG, JPEG, WebP, and GIF; one input file may be up to 8 MB.
  </Step>

  <Step title="Wait for processing">
    The server verifies that the payload is a decodable image, limits its dimensions for the selected use, and returns a CDN URL. A filename extension or MIME header alone is not enough to pass validation.
  </Step>

  <Step title="Save the form">
    Uploading a file does not publish the change. Save the product or publish the layout so the image is marked as referenced.
  </Step>
</Steps>

## Quota and automatic cleanup

Each shop has 10 MB for processed files. The **Files** page shows usage and references and lets you remove an object. A file that is not referenced by any product or shop setting is removed after a grace period: 1 hour on Free or 24 hours while Pro is active.

<Warning>
  Deleting a referenced file removes the graphic everywhere its URL is stored. Remove or replace the reference in the product or editor first.
</Warning>

## API use

`POST /uploads/{shopId}/image` accepts a base64/data-URL image and requires `full` shop access. `GET /uploads/{shopId}/files` returns the objects and quota usage. Products ultimately store an array of URLs, so an API integration may also provide its own public HTTPS URL; ItemShop cannot control an external host's availability or retention.

<Note>
  If R2 storage is not configured for the deployment, the upload endpoint returns `503`. This is a deployment configuration error, not an invalid user file.
</Note>
