I am creating articles via REST API provided by Shopware and mapping the images with variations. the article creation is working ok. onwards I want to update the article via PUT method of REST API, the details are updating fine but the image is inserting again instead of Updation of image mapping with variants.
one way is looking for the image name in database and return the media ID
then use the media ID to upadte the images mapping.
the other way is to use the option ‚__options_images‘ => [‚replace‘ => true]
then your call will upload new images with new mapping and replace the old images.
but this will not delete the old images from the media manager , by every call new images will be uploaded
VG,
Ahmad
@ahmadsaad, Thank you so much for your reply and I have used your solution and it is working fine and exactly what I was looking for. Thank You so much