Images
Rotate Image
Changed onAlthough 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
Request
- Base URLhttps://world.openfoodfacts.net
- AuthAPI key in header User-Agent
Query parameters
codestring required
Example:4251105501381
Barcode of the product
idstring required
Example:ingredients_en
imgidstring required
Example:1
anglestring required
Example:90
Response
OK
Example response
{
"status": "status ok",
"imagefield": "nutrition_fr",
"image": {
"display_url": "nutrition_fr.67.400.jpg"
}
}Changes
- breaking
added the new required
queryrequest parametercode - breaking
the response's body type changed from no type to
objectfor status - info
added the optional property
imageto the response with the status
2 more changes in this revision
- breaking