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

    (@tigroumeow)

    Well, I am not so surprised by this issue. First I would like to start by saying that the plugin creates the retina images for you and allows you to use the delivery method that you like. However, the script which loads those images (the client-side method) is “retina.js”. For this kind of issue, you might try their github forums (which seems to be extremely active).

    The retina images need to have a fixed width and height (the “original” one) as otherwise they would be too big relatively to the website design. Based on that, having image dynamically changing size seems difficult to me… and should probably be handled manually.

    Thread Starter amphibious

    (@amphibious)

    Yeah, you’re correct. I tried using the script directly and the issue is present there.

    Thanks.

    Thread Starter amphibious

    (@amphibious)

    I’ve “fixed” this by commenting out line 119 and 120 in retina.js:

    that.el.setAttribute(‘width’, that.el.offsetWidth);
    that.el.setAttribute(‘height’, that.el.offsetHeight);

    This is probably causing some problem that I’m not aware of, but it solves the issue.

    Plugin Author Jordy Meow

    (@tigroumeow)

    That’s odd, I kind of remember somebody else doing the same change in the retina.js code. Did you find something related on their forum?

    Thread Starter amphibious

    (@amphibious)

    I actually discovered it independently after trying a number of different things… I posted about it on their forum and discovered that there’s a WIP version that has a config option that essentially shuts off the lines I commented out.

    I replaced the standard retina.js in your plugin with the WIP retina.js and turned off the resizing and it works great.

    https://github.com/imulus/retinajs/blob/0.1.0-wip/src/retina.js#L9

    Plugin Author Jordy Meow

    (@tigroumeow)

    I will include this WIP version in the new release, it seems just a better version ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Odd issue with images not matching div width’ is closed to new replies.