• Resolved ticktickatick

    (@ticktickatick)


    Just downloaded and installed the plugin.

    Right now I have wordpress set (Media settings) medium and large to 0x0. I have a photography blog and my photographs are in different sizes depending on the blog. Typically they are either 750×1125, 750×500, or 750×556. I do not want medium and large generated for these images, I want them uploaded full size, which is why I have the 0x0 settings.

    Now that I am on a Retina screen I would like to also use Retina versions. So I have a 750×1125 version for standard screens and a 1500×2250 for a retina screen. Also a 750×500 / 1500×1000 versions for those sizes, and so on.

    I am willing to buy the Pro version, but I am not sure that this plugin can do what I want it to do. I just want to be able to upload a photograph in whatever size I want plus its Retina version doubled, and have the website serve up the bigger one to Retina users. Since my photographs are all in different sizes (horizontal, vertical, triptychs, and collages) I can’t set a standard medium and large size.

    https://wordpress.org/plugins/wp-retina-2x/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter ticktickatick

    (@ticktickatick)

    I went ahead and bought the Pro to try it out, but would like some verification that I am doing this correctly.

    I upload a file, let’s say it is 750×500 dimensions, called image_1.jpg

    I upload another file in the Retina dashboard on the Full-Size Retina upload. It is 1500×1000 dimensions, called image_1@2x.jpg

    In my blog post, I just “add media” as normal, adding the image_1.jpg as full size. WordPress automatically sets the image size in the IMG tag to 750×500.

    Is this right?

    Thread Starter ticktickatick

    (@ticktickatick)

    So it looks there is a bug.

    It works as above with a photo in a blog post but only the photo is left-aligned.

    If I center align it (using WordPress’s built-in align function when you hover over an image) it no longer loads the Retina version.

    Thread Starter ticktickatick

    (@ticktickatick)

    Here is an example of the difference:

    [ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]

    <a href="test2.jpg"><img class="size-full wp-image-2709 alignleft" src="test2.jpg" alt="test2" width="750" height="500" /></a>

    ^ loads retina version when user views blog post

    <a href="test1.jpg"><img class="size-full wp-image-2710 alignright" src="test1.jpg" alt="test1" width="750" height="500" /></a>

    ^ does not load retina version when image is aligned center or right

    I have no other image plugins installed besides WP Retina 2x.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hello πŸ™‚

    I am willing to buy the Pro version, but I am not sure that this plugin can do what I want it to do. I just want to be able to upload a photograph in whatever size I want plus its Retina version doubled, and have the website serve up the bigger one to Retina users. Since my photographs are all in different sizes (horizontal, vertical, triptychs, and collages) I can’t set a standard medium and large size.

    Yes, that’s exactly what the Pro version does.

    Is this right?

    Yes, you did it right. Note that if you upload a retina bigger than 1500×1000 for this case, it will be resized to 1500×1000, so you don’t need to think about the calculation for the retina one.

    It works as above with a photo in a blog post but only the photo is left-aligned.

    Strange. Can I see the URL? Can you try to have a post with this image twice, one center and one left aligned?

    Plugin Author Jordy Meow

    (@tigroumeow)

    I have no other image plugins installed besides WP Retina 2x.

    I have just seen your last message. Can I still see your URL/page? I would like to check a bit more (because that’s supposed to work).

    Thread Starter ticktickatick

    (@ticktickatick)

    Here is a test page

    http://photo.cadence.im/test/

    First one is centered and does not load retina. It is obvious on a Retina screen but you can verify by right-clicking and opening image in a new tab.

    Second one is left aligned and is the Retina version.

    This is the code

    <a href="http://photo.cadence.im/wp-content/uploads/brittany_jai_2.jpg"><img class=" size-full wp-image-2709 aligncenter" src="http://photo.cadence.im/wp-content/uploads/brittany_jai_2.jpg" alt="brittany_jai_2" width="750" height="500" /></a>
    
    <a href="http://photo.cadence.im/wp-content/uploads/brittany_jai_2.jpg"><img class="alignnone size-full wp-image-2709" src="http://photo.cadence.im/wp-content/uploads/brittany_jai_2.jpg" alt="brittany_jai_2" width="750" height="500" /></a>

    It works with “alignleft” and “alignnone” classes but not “aligncenter” or “alignright”. I am selecting the alignment using the image alignment hover in the WordPress visual editor.

    Thread Starter ticktickatick

    (@ticktickatick)

    I have noticed that it is not the alignment persay but it is where WordPress decides to put it in the class statement.

    If it puts the align class first in the class statement: class=”alignright blah blah blah” or class=”alignleft blah blah blah” then it loads the Retina version.

    But if WordPress does “blah blah blah alignright blah blah” or “blah blah blah alignleft” then it loads the regular version.

    There does not appear to be a way to control the order of the class statement on the user end. If you ever edit an image or the text around it, or make any modifications basically, the class order may switch.

    If you could figure out some way to fix this that would be great…going into code all the time is not really a good solution…and sometimes when I reload a post editor it changes things around, so every time I edit a post I would have to re-do that on every image.

    Thread Starter ticktickatick

    (@ticktickatick)

    I have removed the test page as I can’t have a test page showing up in my blog feed

    Plugin Author Jordy Meow

    (@tigroumeow)

    Please create me an account and re-add this page, I will look into it today πŸ™‚

    Thread Starter ticktickatick

    (@ticktickatick)

    I have made the post password protected

    password: retina2x

    http://photo.cadence.im/test/

    Thread Starter ticktickatick

    (@ticktickatick)

    I believe I have narrowed it down further…

    WordPress sometimes adds or modifies images with a space in the class between the first ” and the first class:

    class=” alignnone size-full wp-image-2704″

    class=” size-full wp-image-2704 alignright”

    I don’t know why it does this. I tried it on a stock install and it did this with images as well. WP still recognizes everything it needs to with alignment with the class statement like this.

    WP Retina 2x however breaks if there is a space in the class statement.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Believe it or not but I added something like this in the code:
    $buffer = str_replace( ‘class=” ‘, ‘class=”‘, $buffer );

    Basically I am “fixing” the HTML on the fly in that case. Why not, even though I am not sure I should do it myself. Maybe it will fix more installs, I am sure I have seen this problem in the past using the WP editor.

    I am releasing the fix now πŸ™‚

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘0x0 sizes??’ is closed to new replies.