I've been able to upload images using the REST API but the names are wrong right now and I was thinking to go through all of the products I have and rename the images.

Since I have more than 500 products seems like it could use some automation. Is there a way to update the filename on a media entity?

Not talking about the title which is something else and that can be easily done. I've seen plugins but they go one by one which is undesired.

Any hints?

1 Answer 1


After much digging, it doesn't seem to be possible. I did craft some automation with a Node script that basically does this:

  • Check if the name is correct.
  • If it's not, then download the image, upload with a new name and update the product. If everything goes smooth, delete the original image.
  • Same is repeated for every variation the product might have.

It's a bit cumbersome but effective.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.