Answer the question
In order to leave comments, you need to log in
How to update image in wordpress via rest api?
The site is written in WordPress. There are products with pictures. How to update product images? I get the ID of the picture, I do it like here https://wp-kama.ru/handbook/rest/wp-routes/media, but the picture itself is not updated. This is the problem, how to be, what to read / watch?
Answer the question
In order to leave comments, you need to log in
How is it - how is it?
1. The image is loaded via the /media route , thus the ID of this attachment becomes known.
2. The attachment ID is attached to the post (which field already depends on what we are dealing with at all - it looks easy in the database), which needs it by updating the post along the post_type/post_id route
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question