Hello LiteSpeed Support Team,
I am encountering a challenging issue with the LiteSpeed Cache on my Joomla 4.3.4 website, running PHP 8.1.22. The problem revolves around the caching behavior during the process of transforming images from JPG to WebP format, which is managed by Yootheme Pro. The problem goes away if I turn off the Litespeed cache plugin.
Description of the Issue:
When a page is loaded for the first time, the JPG images are converted to WebP format through a PHP function. The initially served image URL looks like this:
After this initial load, the generated WebP image is saved in a path like this: /templates/yootheme/cache/8e/myimagexxx-208CL-2-8e58d6ca.webp, ready to be "served" in subsequent page renders.
However, upon refreshing the page, the displayed image does not switch to the new WebP version. Instead, the same image continues to be shown (/component/ajax/?p=image&src=%7B"file"%3A"images%2Ftour%2Fwindsor-castle-horseguards. jpg"%2C"type"%3A"webp%2C85"%2C"thumbnail"%3A"726%2C600%2C"%7D&hash=e7d8d296).
It's only after manually clearing the LiteSpeed cache that the correct WebP image is displayed:
/templates/yootheme/cache/e0/castello-di-windsor-guardie-a-cavallo-e09bf50c.webp
Attempts to Resolve:
I have tried to exclude certain URLs from being cached by adding the following patterns to the 'Exclude URLs' section in LiteSpeed Cache settings, but this has not resolved the issue:
This issue is causing significant page load delays, as the correct WebP images are not being displayed until the cache is manually cleared. I am seeking guidance on how to configure LiteSpeed Cache properly to handle this scenario.
Thanks and regards
I am encountering a challenging issue with the LiteSpeed Cache on my Joomla 4.3.4 website, running PHP 8.1.22. The problem revolves around the caching behavior during the process of transforming images from JPG to WebP format, which is managed by Yootheme Pro. The problem goes away if I turn off the Litespeed cache plugin.
Description of the Issue:
When a page is loaded for the first time, the JPG images are converted to WebP format through a PHP function. The initially served image URL looks like this:
Code:
<picture>
<source type="image/webp" srcset="/component/ajax/?p=image&src=%7B%22file%22%3A%22images%2Ftour%2Fcastello-di-windsor-guardie-a-cavallo.jpg%22%2C%22type%22%3A%22webp%2C85%22%2C%22thumbnail%22%3A%22%2C300%2C%22%7D&hash=d5a409d9 363w, /component/ajax/?p=image&src=%7B%22file%22%3A%22images%2Ftour%2Fcastello-di-windsor-guardie-a-cavallo.jpg%22%2C%22type%22%3A%22webp%2C85%22%2C%22thumbnail%22%3A%22726%2C600%2C%22%7D&hash=e7d8d296 726w" sizes="(max-aspect-ratio: 363/300) 121vh">
<img src="/component/ajax/?p=image&src=%7B%22file%22%3A%22images%2Ftour%2Fcastello-di-windsor-guardie-a-cavallo.jpg%22%2C%22thumbnail%22%3A%22%2C300%2C%22%7D&hash=616074df" width="363" height="300" alt="" class="el-image uk-transition-opaque" uk-cover="">
</picture>
After this initial load, the generated WebP image is saved in a path like this: /templates/yootheme/cache/8e/myimagexxx-208CL-2-8e58d6ca.webp, ready to be "served" in subsequent page renders.
However, upon refreshing the page, the displayed image does not switch to the new WebP version. Instead, the same image continues to be shown (/component/ajax/?p=image&src=%7B"file"%3A"images%2Ftour%2Fwindsor-castle-horseguards. jpg"%2C"type"%3A"webp%2C85"%2C"thumbnail"%3A"726%2C600%2C"%7D&hash=e7d8d296).
It's only after manually clearing the LiteSpeed cache that the correct WebP image is displayed:
/templates/yootheme/cache/e0/castello-di-windsor-guardie-a-cavallo-e09bf50c.webp
Attempts to Resolve:
I have tried to exclude certain URLs from being cached by adding the following patterns to the 'Exclude URLs' section in LiteSpeed Cache settings, but this has not resolved the issue:
Code:
?p=image&src=
/component/ajax.html.*
/component/ajax.*
Thanks and regards