• Resolved teknofilo

    (@teknofilo)


    I enabled lazy load images for my article content images. It works great for desktop and the full mobile version of my site.

    I also use “AMP for WordPress” plugin for my AMP version of my site and I noticed that in AMP pages images does not show. I don’t see any way to exclude AMP pages.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @teknofilo,

    This will be included in the next update. For now, you can try to exclude by URL in lazy load settings (if AMP pages have different URLs).

    Best regards,
    Anton

    Thread Starter teknofilo

    (@teknofilo)

    URLs end with /amp/ (e.g. http://www.xxxxxxxxxxx.com/xxxxxxxx/amp/)

    Is there an easy to exclude them?

    Yep, just add /amp to the exclusion list

    Best regards,
    Anton

    Thread Starter teknofilo

    (@teknofilo)

    I am afraid that didn’t work…

    @teknofilo,

    You’re right. Sorry for that. Unfortunately, you’ll have to wait for the update. Or you can manually update the code. In Smush plugin folder in file core/modules/class-wp-smush-lazy-load.php on line 293 replace:

    $request_uri = filter_input( INPUT_ENV, 'REQUEST_URI', FILTER_SANITIZE_URL );

    with

    $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';

    After that, exclusion rules should work properly.

    Best regards,
    Anton

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Lazy load does not work with AMP’ is closed to new replies.