That is, a PUT request to the model will not update the image (other properties of the model will update without issue)

System Information
  • Strapi Version: v4.2.0
  • Operating System: mac
  • Database: mysql
  • Node Version: v16.14.0
  • NPM Version: 8.3.1
  • Yarn Version:

Images associated with the model cannot be updated (they are stored in the media library). That is, a PUT request to the model will not update the image (other properties of the model will update without issue).

Full CRUD rights to the user


1 Like

Im having the same issue, But instead im using POST request for it. The data excluding the image updates but the image does not why ?

Don’t you want to upload a new photo with POST then use the REFID etc to assign it to the correct photo?

I have this love/hate relationship with strapi because i can solve all my issues but only after getting a headache.
I also had the same issue and couldn’t figure out why, then i thought … if I set the old image field to null in the form data, it will set it to null in the backend and then maybe fill it with the new upload? Turns out it works.
Pseudo-code:
formData.append('data', JSON.stringify({avatar: null, otherfields...})