WordPress.org

Forums

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

  1. ericjforman
    Member
    Posted 1 year 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.

    https://wordpress.org/plugins/enable-media-replace/

  2. ericjforman
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year ago #

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

    http://wordpress.org/support/topic/not-updating-img-src-for-resized-images

  5. Bike
    Member
    Posted 1 year 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.

    Thanks!

  6. sigurdurg
    Member
    Posted 1 year 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
    http://pastebin.com/jf8k8EKu

  7. ericjforman
    Member
    Posted 9 months 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

Tags

No tags yet.