Enable Media Replace
[resolved] Only replaces full size of image, but not other sizes (7 posts)

  1. ericjforman
    Posted 2 years ago #

    This plugin used to work but I just tried it again after a year or so. With the current version of plugin and WP, it only replaces the full size of the image, but does not replace or auto-generate thumbnails and other sizes.


  2. ericjforman
    Posted 2 years ago #

    The bug seems to have something to do with the file name. It does not work fully if uploading a new file with the same name. If you change the file name before upload AND choose "use new file name", it does work. If you try a workaround to change the name back and re-upload, even with "use new file name", again it doesn't work, the full size image will work but the other sizes will revert to the old version.

  3. ericjforman
    Posted 2 years ago #

    Follow-up: even using a plugin like "Regenerate Thumbnails" to force update of other sizes does not work. (http://wordpress.org/plugins/regenerate-thumbnails/). Again, it does work with different file names. If nobody else is having this problem, maybe it is something to do with my theme using Custom Post Types?

  4. Måns Jonasson
    Plugin Author

    Posted 2 years ago #

    Correct, and this is by design. Check out my previous explanation why here:


  5. Bike
    Posted 2 years ago #

    Would it be possible to include a check for the size and if the image has the same size/dimensions then the thumbnails are re-generated?

    This would help if you are uploading the exact same image, but optimized for size (compressed etc). The other images should then also be regenerated to have the most optimized version.


  6. sigurdurg
    Posted 2 years ago #

    For anyone interested, I fixed "upload.php" to properly replace all images, not just the full size.

    It uses the same resolution as the previous image (Regular Expression magic).

    Here's the "paste" for upload.php

  7. ericjforman
    Posted 1 year ago #

    thank you sigurdurg

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Enable Media Replace
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.