• Resolved Ariakan

    (@ariakan)


    Hi!

    I updated EWWW Image Optimizer to the last version (6.1.0) and I have an image that didn’t get the right ratio.

    With EWWW lazy load enabled : https://prnt.sc/111xu0v

    <div id="div_block-639-63" class="ct-div-block"><img id="image-640-63" alt="" src="https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-989x1024.jpg" class="ct-image lazyautosizes ls-is-cached lazyloaded" data-src="https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-989x1024.jpg" data-srcset="https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-989x1024.jpg 989w, https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-290x300.jpg 290w, https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-768x795.jpg 768w" data-sizes="auto" width="989" height="1024" sizes="800px" srcset="https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-989x1024.jpg 989w, https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-290x300.jpg 290w, https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-768x795.jpg 768w"><noscript><img id="image-640-63" alt="" src="https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-989x1024.jpg" class="ct-image" srcset="https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-989x1024.jpg 989w, https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-290x300.jpg 290w, https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-768x795.jpg 768w" sizes="(max-width: 989px) 100vw, 989px" data-eio="l" /></noscript></div>

    With EWWW lazy load disabled : https://prnt.sc/111xuax

    <div id="div_block-639-63" class="ct-div-block"><img id="image-640-63" alt="" src="https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-989x1024.jpg" class="ct-image" srcset="https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-989x1024.jpg 989w, https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-290x300.jpg 290w, https://www.ariakan.com/wp-content/uploads/2021/03/William-Vercken-de-Vreuschmen-peinture-768x795.jpg 768w" sizes="(max-width: 989px) 100vw, 989px"></div>

    That’s not a biiig problem as WordPress has lazy load too, so it works, but maybe you wans to be aware of this issue, so I did this post.

    You can see the website here : https://www.ariakan.com (but I disabled the lazy load option)

    Have a nice day!

    William

    • This topic was modified 3 years, 7 months ago by Ariakan.
    • This topic was modified 3 years, 7 months ago by Ariakan.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    I am indeed curious to see how/why the new feature in 6.1.0 has the wrong “ratio”, so I checked your page, and it seems that it is because the image width is constrained via CSS without using height=auto (or otherwise doing anything with the height).

    The height/width “fill” can be disabled with this filter, though I’ll see if we can get an option in the UI for the next release:
    add_filter( 'eio_add_missing_width_height_attrs', '__return_false' );

    Thread Starter Ariakan

    (@ariakan)

    Hi !
    Thank you for your reply and for your instruction. ??

    For now I will just disable lazyloading and let wordpress do it instead, but I will check your future updates!

    Have a nice day.

    William

    Thank you for the filter @nosilver4u! I was also having issues with this in our application’s CSS but did want to make sure I still updated to the latest version.

    Plugin Author nosilver4u

    (@nosilver4u)

    The 6.1.1 release was just launched with “Add Missing Dimensions” configurable on the Basic tab, and disabled by default.

    Thread Starter Ariakan

    (@ariakan)

    Hi @nosilver4u , I can confirm it works. Thank you! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘6.1.0 – Lazy Load get me the wrong ratio for an image’ is closed to new replies.