1

I'm trying to post an image to a product, but on post I dont know where exactly to put it. Should I put on custom_attributes as when I get it on GET ? Didn't have success, even using image, small_image and thumbnail and the same link image as one that I added manually. Or should I use other way like Media Gallery Entries? If so could I get an example? because on documentation they only tell me things like "string" and don't know which are the possibilities.

Thanks.

1

request url : magentourl/index.php/rest/V1/products/sku/media use this :

{
  "entry": {
  "media_type": "image",
  "label": "Image",
  "disabled": false,
        "types": [
            "image",
            "small_image",
            "thumbnail"
        ],
  "file": "string",
  "content": {
  "base64_encoded_data": "basec64encoded",
  "type": "image/png",
  "name": "new_image2.png"
  }
 }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.