Image Upload Basics

Image Upload Basics

Here's a list of things to keep in mind when trying to upload images for products with the API:

  • Uploading images is done with the following endpoint: /api/2.0/products/{product_id}/actions/image_upload.
  • The request has to be multipart/form-data with the binary image data submitted as the value of the image field of the form.
  • Images can be in jpg/png formats.
  • There is a limit of 2000px for the maximum height/width. Larger images will be scaled down accordingly.
  • The image CANNOT be submitted as the URL pointing to the file.
  • It's not possible to attach image information to the request when creating a product. Creating a product and uploading the image has to happen with 2 separate requests.

Code samples

We've prepared a number of simple code examples for different languages showing how a locally available image file can be uploaded to Lightspeed Retail (X-Series):


Did this page help you?