Support » Plugin: WP YouTube Lyte » Thumbnails lazy load

  • Resolved rom1our

    (@rom1our)


    Hello,
    I’m trying to optimize my site and found the thumbnails (not lazy) loading from i.ytimg.com . I’ve set then Youtube Lyte to local cache but now I see only the title on a black background and the player symbol. I checked the wp-content/cache/lyteCache folder. The permissions are 0755, in the folder is only one file, index.html with permissions 0644 and the content
    <html><head><meta name="robots" content="noindex, nofollow"></head><body>Generated by <a href="http://wordpress.org/extend/plugins/wp-youtube-lyte/" rel="nofollow">WP YouTube Lyte</a></body></html>

    I’m using autoptimize, clearfy, wp fastest cache pro and Cloudflare.

    How can I solve the problem of the local cache or is there another way to lazy load the thumbnails?

    The page I need help with: [log in to see the link]

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

    (@optimizingmatters)

    Something (a security plugin?) is blocking those images from being loaded:

    But to be clear local thumbnail caching only changes the origin of the background image, not the way it is loaded, so it will still be marked as not being lazyloaded (even if the image effectively is loaded later, it’s just that Google Pagespeed Insights wants it even lazier).

    frank

    Thread Starter rom1our

    (@rom1our)

    Looking into the Cloudflare Cache I found several requests to lytecache.php. They all bypass Cloudflare and receive the 403 response. In the Cloudflare firewall I found no entry. I have no special security, only for login, and I have no idea why the 403 is there. The lyteCache folder is empty.

    You can try the test page https://test.tourist-in-rom.com/ probably you can see more as wp fastest cache and autoptimize are disabled.

    With the other lazy loaded images I don’t have problems with Pagespeed. I would like to strip the 60 kB of the thumbs to speed up loading on mobile networks (I will also move to the Block editor now).

    • This reply was modified 10 months, 1 week ago by rom1our.
    • This reply was modified 10 months, 1 week ago by rom1our.
    • This reply was modified 10 months, 1 week ago by rom1our.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    same problem I’m afraid:

    Thread Starter rom1our

    (@rom1our)

    Hi Frank,
    my host provider asks
    What is the full url so we can replicate seeing the 403 error?
    Thank you
    Bernhard

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Thread Starter rom1our

    (@rom1our)

    Hi Frank,
    xmlrpc is blocked onmy server, do you need it?

    The provider suggested to disable all plugins, only lyte active, and use a standard theme. I did so and used the 2020 theme. But no change, no thumbnail available.

    Referring to the link, the provider says
    “Looking at the URL we see the URL base location/file is ‘tourist-in-rom.com/wp-content/plugins/wp-youtube-lyte/lyteCache.php’.
    (and then, through that, the slug indicates it is trying to direct it to further process or find a .jpg file)

    This is different from a standard jpg file that serves fine from the server, for example a test tests out fine:
    https://www.tourist-in-rom.com/a2cctestpuppy.jpg (‘/home/touris96/public_html/a2cctestpuppy.jpg’)

    What this means is that you need to look inside the script (the wp-youtube-lyte/lyteCache.php script) functionality, see what it’s trying do do, and then see where that’s breaking.”

    The lytecache directory is still empty.

    Any idea how to solve this?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    No, LYTE does not use xml-rpc.

    Yes, LYTE uses PHP to fetch the cached image and that is somewhat unusual (but is done for good reason; it allows one and the same PHP-file to fetch images that are not cached yet, to cache them, to serve from cache, to ensure the right cache-control/ expires headers are added, to ensure a non-found image is handled gracefully …)

    But the 403 error-page (where 403 = access not allowed) is not from LYTE I’m afraid. Could be a directive in a .htaccess file maybe?

    Thread Starter rom1our

    (@rom1our)

    Hi Frank,
    all php access was blocked in the plugin folder. I allowed now access to lyteCache.php and it works.
    Thank you πŸ™‚

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome, feel free to leave a review of the plugin and support here! πŸ™‚

    frank

    Thread Starter rom1our

    (@rom1our)

    Hi Frank,
    looking into the Waterfall I found that the thumbnails are now loaded twice, once from from i.ytimg.com and once via the lyteCache.php.
    In wp-content/cache/ the lyteCache folder disappeared.
    Why does this happen?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Absolutely bizarre; the response has a 301 header but also returns the image. If the lyteCache folder isn’t there, the 301 makes sense but then the image itself cannot be served by lyteCache.php. And if a request for a thumbnail is received by lyteCache it will (try to) recreate the cache-folder, which also is not happening?

    So re. the folder; *something* seems to have removed it and it cannot recreate so that might be a filesystems permission issue.

    Re. the 301 + image: the only thing I can of is a mix-up with LiteSpeed and/ or Cloudflare somehow?

    Thread Starter rom1our

    (@rom1our)

    I have now created the lyteCache folder manually and it has loaded the thumbnails. Then I created an exclude rule for lyteCache.php in WP Fastest Cache and this solved the problem.
    Thank you for your help πŸ™‚

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Happy to hear πŸ™‚

    Thread Starter rom1our

    (@rom1our)

    Hi Frank,
    something deletes the /cache/lyteCache folder and I created it now again manually. Is there a way to solve the issue, protecting the folder or recreating it automatically?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    it _should_ recreate automagically, on condition of the parent folder having rwx permission for the process under which php/ webserver are running rom1our ?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Thumbnails lazy load’ is closed to new replies.