• Hello,

    I love your plugin but it seems that it breaks WP Rocket lazyload system. Hope you can fix this.

    I contacted WP Rocket about this and sent them the following:

    —————-

    As you can see on the page https://1571642232.webton.dev/werkwijze/ almost at the bottom there are several logo’s. But the first logo is not visible.
    When I turn OFF the image lazyload it works fine as seen on https://www.brixcrm.nl/werkwijze/

    The only thing different here is that the logo that is not shown has a link on the image.
    It’s a native WP gallery with a plugin to create links on images in galleries.

    —————-

    Their reply was the following:

    I’ve checked this and found that the issue is related to the fact that the Gallery Custom Links is adding the URL around the inside the <picture> tag:

    ON3nZh.jpg
    Full-Scale image > https://i.vgy.me/ON3nZh.jpg

    This isn’t valid markup and it’s breaking the preg_match_all function WP Rocket uses to detect <picture> tags:
    https://github.com/wp-media/rocket-lazyload-common/blob/438cff5e29519bce9d2e6c964a906ff410ce6313/src/Image.php#L113

    You should contact the plugin’s dev and ask them to take into consideration that tags are also found in <picture> tags. In such cases, the link should be applied to the <picture> tag and not to the which is inside that.

  • The topic ‘WP Rocket issue | invalid markup’ is closed to new replies.