Want more timely Centmin Mod News Updates?
Become a Member

Wordpress Wordpress cached images issue

Discussion in 'Blogs & CMS usage' started by iaTa, Mar 2, 2019.

  1. iaTa

    iaTa Member

    89
    16
    8
    Mar 26, 2018
    Ratings:
    +32
    Local Time:
    12:01 AM
    Nginx 1.31.x
    MariaDB 10.11.x
    I have a problem with images sometimes rendering far larger than they should. I've checked the code and when an image loads correctly I see this:
    HTML:
    <img class="preload-me lazy-load is-loaded" src="https://site.co.uk/wp-content/uploads/2017/07/x61wKIUHA-yL._SL1500_-60x60.jpg.pagespeed.ic.QQA7eGmZLu.webp" alt="" style="will-change: auto;" srcset="https://site.co.uk/wp-content/uploads/2017/07/61wKIUHA-yL._SL1500_-60x60.jpg 60w, https://site.co.uk/wp-content/uploads/2017/07/61wKIUHA-yL._SL1500_-120x120.jpg 120w" width="60" height="60">
    After a few page refreshes an image may be rendered far too large and the code shows the following:
    Code:
    <img class="preload-me lazy-load is-loaded" src="data:image/webp;base64,UklGRoIBAABXRUJQVlA4IHYBAABQCACdASo8ADwAPpFCm0glpCKhLhbZyLASCWkACwBHOhENY/HQ0DHwDhiHknH+RiY9o0O+8/MljEzbH6DGmVqoucJLmzfCmOYPDwAA/vshnwNvL/C+N+esUpDmFWiAEmn8L7+nvkkjoyJJExgMZz5LGqMwE620vYhF9v7L6wntSqR83zLf+lRpnYXmSoLK2u5dc3tgpTlOns4hgHBBuqhCyXnYhFUk0YqZErqJV2W5+FYKh/2W6Vavc/BBIVxpz+95ayhRe9NOHqjsNHdBtnsk2i0qlBfb5fzmSUFMMgBjzq+92OYZLnavfbjgjIlUk7VHi/Mnq6SxPhm/bx2UeXJlId6JSdT8KpmnxZziPkSm3j9Y8UbtBXumwgH9eN7te/7IZtnNUl5TWPrlfWDbNlAV73Q9w9A7IIiBf4TH2jQATqv9cHkFfDm+I2iqsS42foVfd29wXiX5lF61zjzmwwQkThqrp5hYnfDe6PFeL41DNDrVmHAAAA==" alt="" data-pagespeed-url-hash="1322903256" onload="pagespeed.CriticalImages.checkImageForCriticality(this);" style="will-change: auto;" srcset="https://site.co.uk/wp-content/uploads/2017/07/61wKIUHA-yL._SL1500_-60x60.jpg 60w, https://site.co.uk/wp-content/uploads/2017/07/61wKIUHA-yL._SL1500_-120x120.jpg 120w">
    Any ideas what could be causing this issue, maybe pagespeed?

    custom_config.inc:
    Code:
    NGXDYNAMIC_NGXPAGESPEED='y'
    NGINX_PAGESPEED='y'
    PHP_PGO='y'
    PHP_PGO_CENTOSSIX='y'
    LETSENCRYPT_DETECT='y'
    VHOSTCTRL_CLOUDFLAREINC='y'
    NGXDYNAMIC_BROTLI='y'
    NGINX_LIBBROTLI='y'
    NGINX_HPACK='y'
    NGINX_DYNAMICTLS='y'
    CLOUDFLARE_ZLIBPHP='y'
    CLOUDFLARE_PATCHSSL='y'
    OPENSSLECDSA_PATCH='y'
    OPENSSLECDHX_PATCH='y'
    MARCH_TARGETNATIVE='y'
    ENABLE_MARIADBTENTWOUPGRADE='y'
    ENABLE_MARIADBTENTHREEUPGRADE='y'
    pagespeed.conf: https://gist.githubusercontent.com/...60e39e8c1b0290ed40c7144503320e/pagespeed.conf

     
    Last edited: Mar 2, 2019
  2. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    9:01 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    that is ngx_pagespeed converting images to data uris which should be be done for small sized images by default
     
  3. iaTa

    iaTa Member

    89
    16
    8
    Mar 26, 2018
    Ratings:
    +32
    Local Time:
    12:01 AM
    Nginx 1.31.x
    MariaDB 10.11.x
    Do you know why some of these small thumbnail images sometimes get rendered massively over size when they have been converted to these data uris?

    For example this should be a tiny thumbnail next to the latest blog post listed in the footer: Capture

    This is happening on multiple different sites on the same server.
     
  4. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    9:01 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    some images just do.. so you can just setup a exclude filter in pagespeed.conf for specific image urls
     
  5. iaTa

    iaTa Member

    89
    16
    8
    Mar 26, 2018
    Ratings:
    +32
    Local Time:
    12:01 AM
    Nginx 1.31.x
    MariaDB 10.11.x
    Can I just disable that feature of ngx_pagespeed?
     
  6. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    9:01 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  7. iaTa

    iaTa Member

    89
    16
    8
    Mar 26, 2018
    Ratings:
    +32
    Local Time:
    12:01 AM
    Nginx 1.31.x
    MariaDB 10.11.x
    Sorted, thank you.