---
title: "Rotate Image"
method: GET
path: "/cgi/product_image_crop.pl"
tags: ["Images"]
---

# Rotate Image

`GET /cgi/product_image_crop.pl`

## Request

- Base URL: `https://world.openfoodfacts.net`
- URL: `https://world.openfoodfacts.net/cgi/product_image_crop.pl`
- Auth: API key in header `User-Agent`

Although we recommend rotating photos manually and uploading a new version of the image,
the OFF API allows you to make api calls to automate this process.
You can rotate existing photos by setting the angle to 90º, 180º, or 270º clockwise.

## Query parameters

- `code` string, required
- `id` string, required
- `imgid` string, required
- `angle` string, required

## Response `200`

OK

- RotateAPhoto
  - `status` string
  - `imagefield` string
  - `image` object
    - `display_url` string

## Changes

- **2026-11-18** `ebaef6823f1f`: 2 breaking, 3 info
  - added the new required `query` request parameter `code`
  - the response's body type changed from no type to `object` for status `200`
  - added the optional property `image` to the response with the `200` status
  - added the optional property `imagefield` to the response with the `200` status
  - …1 more
- **2025-11-07** `61843b2fdbde`: 1 warning
  - deleted the `query` request parameter `code`
- **2025-07-02** `7193ad484e5d`: 2 info
  - api tag `Images` added
  - api tag `Write Requests` removed

[Operation history](https://skmtc.dev/openfoodfacts/apis/open-food-facts-open-api/changes/cgi/product_image_crop.pl/get.md)

---

[API](https://skmtc.dev/openfoodfacts/apis/open-food-facts-open-api.md) - [All operations](https://skmtc.dev/openfoodfacts/apis/open-food-facts-open-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openfoodfacts/apis/open-food-facts-open-api/revisions/ebaef6823f1f?raw)
