• Resolved michelakn

    (@michelaarakne)


    Hi! Thank you for your awesome plugin!
    I installed it in my website and turned on the lazy loading feature on the images. On the site I also installed another plugin called Webpexpress which alters the HTML by replacing <img> tag with the <picture> tag.
    The final markup is something like this:

    <picture><source data-srcset="image.png.webp" type="image/webp" srcset="image.png.webp"><noscript><img src="image.png" class="webpexpress-processed"></noscript><img src="image.png" data-src="image.png"class="webpexpress-processed lazyloaded"></picture>

    Unfortunately the w3c validator report an error because the <noscript> tag cannot be into a <picture> tag. Is there a way to move the <noscript> tag added by Autoptimze outside the <picture> tag?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    The fact the w3c validator does not like it is not something browsers really care about, but if w3c approval is important and if you know some PHP, you can hook into the autoptimize_filter_imgopt_lazyloaded_img filter to remove the <nosrcript tag ?

    hope this helps,
    frank

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    any news michelaarakne ?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    No feedback so I assume this got resolved? Feel free to follow up if you still encounter issues!

    have a nice day!
    frank

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Images lazy loading and webpexpress’ is closed to new replies.