Upload product image
upload_imageUpload a product image to Open Food Facts by specifying barcode, imagefield (front, ingredients, nutrition, packaging, other), and base64-encoded JPEG or PNG data. Requires OFF_USER_ID and OFF_PASSWORD.
Instructions
Upload a product image to Open Food Facts. Requires OFF_USER_ID and OFF_PASSWORD.
Prefer more photos over fewer. Panels with text (ingredients, nutrition, certifications, recycling instructions) are highest value as OFF can OCR them. Plain sides with just a colour or logo are lowest value but still worth uploading if you have them.
Use the most appropriate imagefield (front, ingredients, nutrition, packaging). Use "other" for additional photos — this uploads without selecting the image as a display image, which is useful when a good display image already exists or for supplementary angles.
The OFF server auto-selects images for front/nutrition/ingredients/packaging on upload unless one is already selected. If you get "status not ok" but a positive imgid, the image uploaded successfully but was not selected (e.g. a display image already exists).
For images on disk, base64-encode them first (e.g. via shell: base64 -i photo.jpg).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| barcode | Yes | Product barcode | |
| imagefield | Yes | Image type | |
| image_data | Yes | Base64-encoded image data (JPEG or PNG) | |
| lc | No | Language code for the image (default: en) | en |