I use the WP All Import to bring in images and stock info via XML into my store. However some of the images that come from a 3rd party system are rotated wrong. If I rotate them manually in the media editor they then save with a new filename. This causes a problem as when my import plugin system runs again it detects that there isn't a image with the same filename on the system to display, so it uploads a new copy and tells Woocommerce to use that image instead of the rotated image due to the new filename.

I need a way to manually rotate images, that I see wrong inside wordpress and overwrite the original file name. How can this be done? can I hack the code to do it? can I alter a function in the child theme? or is there plugin out there that has a manual rotate button on it that overwrites the image.

Any help appreciated


  • It partly depends on whether you're using a CDN or caching of any type. You could rotate them offline (Photoshop, etc.) and upload them via FTP, overwriting the originals, but that typically does not also update a CDN and you might also need to flush the cache. – WebElaine Jun 11 '19 at 21:00
  • I am not using a CDN or any caching, the files are FTP'd to our server and the import tool pulls the product information from the XML and images uploaded. I currently replace them manually after downloading and rotating with Enable Media Replace plugin, however it would be easier for other staff if they could just hit rotate and save inside of wordpress. – Dan Coates Jun 11 '19 at 21:03
  • It's Core functionality to save a new filename whenever you use the WP image editor. They try to keep your original intact. I would suggest looking for a plugin that might do this for you and overwrite the original - plugin recommendations are off-topic here and you might want to check a FB group where they're on topic - or it should be possible to write your own plugin to add a button to the media editing screen that rotates and saves over the original, instead of creating a new file. – WebElaine Jun 12 '19 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.