Product Images

I've being searching around but can't find any info on how to use api to upload product images.

The best that I can find is to update the details for main_pair or image_pairs.

main_pair: {
detailed: {
https_image_path: "xxx.jpg",
But there is no mention of how to upload a new image and assign to the product.
From the vendor.php page, whenever we select a new image, it make a ajax call to this page
local_data: {name: "xxx.jpg", type: "image/jpg", path: "sess_data/xxxx.jpg", error: 0, size: 24561}
But if I do the ajax call from another page, it is show Access denied: Possible CSRF attack.
Please assist to provide more info on how to upload product images. Thanks.


Did you try this via API?

Best regards


Hi Robert,

Can u tell m how to do it via API? From the REST API documentation, I can't find any info of how to upload product image and assign it to a product.