1

I have four stores created, and I'm trying to upload a single image for the same product in each of the stores.

My issue is that to get an image to show in the category front end view, I need to specify "small_image" in the "types" field:

{
  "entry": { 
      "mediaType": "image",
      "position": 0,
      "disabled": false,
      "types": ["small_image"],
      "content":{
        "base64_encoded_data": "ENCODED_IMAGE",
        "type": "IMAGE_MIME",
        "name": "IMAGE_FILENAME"
    }
  }
}

However, when viewing the items in each store, it shows four of the same image.

I have tried loading a single image to the default store, and it shows when viewing the item in each store, but the categories in the stores show no images except for the default store.

I have tried loading a single image to the all store ID (rest/all/V1/products/{{SKU}}/media), and that just shows once when viewing the item, but has no category image.

I have spent a loooong time on this, using all the different images types, and can't find a combination that works.

So, my question is, how do I load a single image that shows in the categroy view, and only once for each item in each store?

0

Yes, this is kind of weird. I implemented a workaround that basically creates the image only once on the default store. After doing so I have to update the image types ["image", "small_image", "thumnail"] for all the ~ 30 stores in order to make category images work.

While this is expensive but worked so far, I just stumbled over an anoying issue. Whenever I want to delete this image globablly, I have to remove the image types on by one again on all stores, otherwise the API well return "true" for delete request on "all" store, but won't actually delete it.

The behaviour is well explained in this ticket.

1

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.