Images

Rotate Image

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.

GET
/cgi/product_image_crop.pl
User-Agent<token>

Identification using the User-Agent header. This is recommended in all requests so that we can contact you if there are issues. If we cannot identify the source of problematic API queries, we may have to block them. User-Agent header in the format 'app_name/app_version (URL or contact info)'

In: header

Query Parameters

codestring

Barcode of the product

idstring
imgidstring
anglestring

Response Body

curl -X GET "https://world.openfoodfacts.net/cgi/product_image_crop.pl?code=4251105501381&id=ingredients_en&imgid=1&angle=90"
{
  "status": "status ok",
  "imagefield": "nutrition_fr",
  "image": {
    "display_url": "nutrition_fr.67.400.jpg"
  }
}