WordPress.org

Forums

Enable Media Replace
[resolved] Replacing Images with different Aspect Ratios (2 posts)

  1. Hello again

    I just experienced the following issue, that I think would be marvelous to address in a future version.

    I had a photo, alligator.jpg. I put the Medium Size in a post, so the html code looked like <img src='.../alligator-300x225.jpg'>

    When I replaced the photo with ostrich.jpg, which had a slightly different aspect ratio (ratio between width and height), the filename of the medium size of this photo is now alligator-300x200.jpg. Obviously, that's going to break the medium sized image in the post.

    Would it be possible, when replacing an image using the 'just replace' option, to also update these links in posts and pages for all sizes?

    For example, in the situation above:

    - alligator.jpg is about to be replaced, so save what each of the sizes links are, such as: alligator-300x225.jpg, alligator-600x250.jpg, etc.
    - After creating the different image sizes for the NEW alligator.jpg, take note of what the new sizes are, such as: alligator-300x200.jpg, alligator-600x500.jpg
    - Then in the find/replace process, be sure to update all links pointing to the old image size with the correct link to the new image size?

    Thoughts?

    http://wordpress.org/extend/plugins/enable-media-replace/

  2. Måns Jonasson
    Member
    Plugin Author

    Posted 2 years ago #

    I know, but the problem is that it's very difficult for me to guess which new thumbnail format to use instead of the old one. I don't want to mess up posts because the plugin is changing dimensions of images, which in turn could lead to formatting problems, breaking margins and re-flowing text, etc.

    The only real way to have this fixed is to hope that the WordPress core devs some time in the future will switch to a dynamically generated thumbnail flow. I have one set up on one of my larger sites using timthumb, and it eliminates these kinds of problems since all thumbnails are generated on-the-fly and all from the original image.

    TL;DR: Sorry, there is no good way of doing this right now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.