Image replace not working on resized images
-
To run through the problem I had…
upload image called “nXeQv.gif”. file path is /wp-content/uploads/2017/10/nXeQv.gif
add image to test post using Add Media button, url is – https://domain.com/wp-content/uploads/2017/10/nXeQv-300×169.gif
Note that its an auto resized version of the original, original url is https://domain.com/wp-content/uploads/2017/10/nXeQv.gifView post, loads fine.
Go to replace image, using same name, same file type. Once the replace is done the main file is replaced, the above link, when clicked, loads it fine. However the resized version is not replaced. Its deleted and results in a 404.
Obviously WP is creating multiple versions, at some point, of various sizes and the issue is the Replace isnt doing the same thing, its just replacing the main file and doing a database search for the name nXeQv.gif. Its found/replaced but nXeQv-300×169.gif is not.
Its a shame as I thought this plugin was a great idea. Would need to consider copying the WP resize process or using regex in the name to account for various sizes.
- The topic ‘Image replace not working on resized images’ is closed to new replies.