REST API not updating image link
-
Hi,
I am trying to work out a way to bulk update my images in woocommerce, and am getting stuck already in postman trying to figure out how to update the image source link in a product.
Whenever I PUT the following:
{
“name”: “testproduct”,
“images”: [
{
“id”: 20435,
“src”: “https://www.mywebsite/com/images/testimage.jpg”,
“position”:0
} ]}
to the correspondings product endpoint; whenever I make a change to the “name” it works as intended, the postman response gives back the changed name ( and ofcourse the entire related product Json), however the image link always remains the stuck to be the old link."images": [ { "id": 20435, "date_created": "2021-06-30T13:02:27", "date_created_gmt": "2021-06-30T13:02:27", "date_modified": "2021-07-11T13:14:19", "date_modified_gmt": "2021-07-11T13:14:19", "src": "https://www.mysite.com/wp-content/uploads/2021/06/testimageold.jpg", "name": "testingproduct", "alt": "testingproduct "I found earlier posts having similar issues and they mention to include the image ID in the PUT, and position for good measure, but removing or using this has no effect.
as far as I can tell, the image location is freely accesible, so I dont see why this would not work. Does anybody have an idea where I am going wrong?The page I need help with: [log in to see the link]
The topic ‘REST API not updating image link’ is closed to new replies.




