• Resolved 21stcn

    (@21stcn)


    After updating to 3.3.2 from 3.2.10 the lazyaspectratio (height calculation before image load) no longer functioned for me.

    After much investigation I discovered the issued was caused by the following:

    In the previous versions, you added the class .js to the html element and had this inline css declaration:

    .js .lazyload { display: block; }

    In 3.3.2 you removed the .js class and yet did not add a new declaration anywhere that the images should be block elements, which is required for the lazyaspectratio to work.

    So for many users, like myself, there will be instances where images will not be display block by default, so the lazyaspectratio will not work.

    Thanks for the fantastic plugin but I would like to urge that you are a little more delicate with changes between versions, and account for backwards compatibility. While I really appreciate your work, your version changes include so many drastic changes that it is very stressful for me to update your plugin. As a developer, for example, I augment your plugin with styles etc., then suddenly classes and css declaration disappear.

    Thanks

    • This topic was modified 6 years, 8 months ago by 21stcn.
    • This topic was modified 6 years, 8 months ago by 21stcn.
    • This topic was modified 6 years, 8 months ago by 21stcn.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    Hey,

    sorry to hear that, was not my intention to break backwards compatibility. I was not aware that the display: block is necessary for the aspectratio plugin (I did not notice it during testing because the theme set it for the images), initially it was just there to overwrite the display: none for the case that JS is disabled (exactly like the .js class), and I removed that in favour of a solution via the noscript element and thought it would be safe.

    Would you give the version from GitHub a try if it fixes the issue for you (the lazy-loading-responsive-images.zip https://github.com/florianbrinkmann/lazy-loading-responsive-images/releases/tag/v3.3.3-beta.1)? It adds back the display: block for the lazyload class.

    Thanks,
    Florian

    Thread Starter 21stcn

    (@21stcn)

    Thanks for the reply.

    I haven’t tried the beta but simply adding this to my stylesheet fixes the problem, so I’m sure it will work:

    .lazyload { display:block; }

    I guess it is because the lazyaspectratio script makes its calculations based on the computed height of the element, only if the element takes up space as a block element.

    Thanks for your help

    Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    Thanks, I will release version 3.3.3 with the fix shortly to the W.org repo.

    Best regards,
    Florian

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘lazyaspectratio broke after 3.2.10’ is closed to new replies.