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
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 1 year, 3 months ago by
rom1our.
-
This reply was modified 1 year, 3 months ago by
rom1our.
-
This reply was modified 1 year, 3 months ago by
rom1our.
Hi Frank,
my host provider asks
What is the full url so we can replicate seeing the 403 error?
Thank you
Bernhard
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?
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?
Hi Frank,
all php access was blocked in the plugin folder. I allowed now access to lyteCache.php and it works.
Thank you 🙂
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?
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?
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 🙂
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?
it _should_ recreate automagically, on condition of the parent folder having rwx permission for the process under which php/ webserver are running rom1our ?