WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: WP Retina 2x] Plugin Creating Out of Proportion @2x Images

[Resolved] [Plugin: WP Retina 2x] Plugin Creating Out of Proportion @2x Images

  • jlomaga
    Member

    @jlomaga

    Here is an interesting thing I just noticed with the plugin, it’s a little wordy hopefully I don’t lose you……

    My theme for the Featured Image in a post and the main page slide show uses an image 640×250. WordPress on upload creates this sized image. Most times I’m creating an image in photoshop that is 1280×500, so the proportions stay the same and wordpress doesn’t have to crop anything only scale. SO now I have an original image that is 1024×576, wordpress crops the image to 640×250, but Retina 2X creates a @2x version that is 1024×500. THis leads to the image being out of proportion and then when the 2X image loads it cause the image to change size vertically. It seem the plugin when building images isn’t taking height into account and is only taking width, as from my original it had the width to generate an image the correct size but not the height.

    So to sum up, is it possible to have the plugin not generate images if there isn’t the correct height as well? I’d rather have a low res version load then have an image pop and cause a content shift. I can hard code the image css to be strict on the size however that leads to a squashed image.

    http://wordpress.org/extend/plugins/wp-retina-2x/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jordy Meow
    Participant

    @tigroumeow

    Actually the plugin is supposed to create images that are exactly like the original (or the “resized” original like for example the Thumbnail, Medium and Large) but multiplied by 2.

    Is this “size” of 640×250 showed in the WordPress Media settings? Or is this handled by the theme?

    Is there a way I can reproduce this problem on a basic installation of WordPress with the default theme?

    jlomaga
    Member

    @jlomaga

    It’s being handled by my theme. But WP Retina recognizes it fine.

    However I did test using Twenty Eleven and in media setting of wordpress set the thumbnail to 640×250 and select “crop” in media settings(As this acts the same way my theme handles the images). What happens is WP takes the 1024×576 image, it then crops and makes a 640×250, but then the plugin makes a 1024×500 as the @2x version. When you insert the image into the post and then view it, you will see the 640×250 will load and then when the @2x version loads the width remains the same by the height will pop taller and the image will be scaled and not cropped.

    Plugin Author Jordy Meow
    Participant

    @tigroumeow

    Hello again,

    Thanks to your details I found the bug for this issue! I updated the trunk of WP Retina 2x, as I want to make sure it works better before to update it for everyone.

    Can you replace two of the plugin files in your WordPress? The two files that needs to be updated are those:
    http://plugins.svn.wordpress.org/wp-retina-2x/trunk/wr2x_vt_resize.php
    http://plugins.svn.wordpress.org/wp-retina-2x/trunk/wp-retina-2x.php

    Then I think you’ll have to delete the Retina files that were previously created and… try again. Tell me if it works for you.

    jlomaga
    Member

    @jlomaga

    BINGO, those new files worked perfectly. It didn’t create a @2x version for any images that didn’t have the required height.

    Plugin Author Jordy Meow
    Participant

    @tigroumeow

    Thanks, that’s awesome 🙂 I’m glad this bug was resolved. I will push the official update sometimes today.

    Please rate the plugin when you have time ^^ And thanks a lot again for finding this bug and testing the new files.

    jlomaga
    Member

    @jlomaga

    Now if only I can figure out how to get the non-wp media to work

    Plugin Author Jordy Meow
    Participant

    @tigroumeow

    You mean the images related to your themes or the other plugins? You will have to upload a @2x images by yourself for those.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] [Plugin: WP Retina 2x] Plugin Creating Out of Proportion @2x Images’ is closed to new replies.