Forum Replies Created

Viewing 15 replies - 16 through 30 (of 2,151 total)
  • serpentdriver

    (@serpentdriver)

    Leave these settings for “WebP Attribute to Replace” field untouched. There is no need to change these settings.

    serpentdriver

    (@serpentdriver)

    As I said before, I’m not claiming to be absolutely right. Especially since I only know the Shortpixel plugin in part. Unfortunately, I cannot get the same information from the Shortpixel documentation as you describe. Especially when it comes to the double file extension. If you’re actually right and unreservedly so, then there’s really no reason why Shortpixel shouldn’t work. However, there is something to check. Please look in the .htaccess in the root directory to see if you can find entries for webp replacement between the LiteSpeed markers.

    serpentdriver

    (@serpentdriver)

    The location doesn’t matter, but LiteSpeed cache plugin also writes all converted images in the same directory where all other images are located. The difference is that cache plugin changes the file extension of each image and modifies the source of <img> tag. This method is quite different to almost any other plugin that creates webp images.

    Shortpixel also generates .webp images, but leaves the source of the <img> tag unchanged and uses a server function to provide webp. This means that the source remains the same, but the MIME-type is changed. This makes it look like the original image is being loaded, but it is actually the webp variant. If you see .webp images in the /upload directories, then the images with *.jpg.webp images are generated by LiteSpeed and not by Shortpixel, at least that’s what the Shortpixel documentation says.

    The advantage of this method is that not only is this method different, but it is not tainted with the bugs of other plugins. Shortpixel uses the Accept header to determine if a browser supports webp images. However, this method is very faulty and does not work fully with the Apple Safari browser. This means that certain Safari versions (have to) load webp images, even though these versions do not support webp at all.

    Ultimately, this has nothing or almost nothing to do with your problem. It’s just that PHP is required for image conversion when it happens on-the-fly when a page is requested, but when a page is cached there is no more PHP. This fact has never changed.

    serpentdriver

    (@serpentdriver)

    The technical support from my hosting service recommended making changes in the “WebP Attribute to Replace” field

    Where is this displayed?

    serpentdriver

    (@serpentdriver)

    Without guaranteeing that I might be right, but it looks like Shortpixel creates the webp images on-the-fly. This requires PHP. When a page is cached, there is no more PHP. The output in the browser then only comes from a static file on the server. This is how any HTTP cache works. In your case, this means that you cannot use Shortpixel if Shortpixel does not create the webp images in advance using a separate service.

    But as already mentioned, this is only an assumption, but a very probable one.

    serpentdriver

    (@serpentdriver)

    Use whatever you like to rename the image extension.

    serpentdriver

    (@serpentdriver)

    Because the cache plugin and the code from above expects *.jpg.webp

    serpentdriver

    (@serpentdriver)

    How did you convert the images? *.webp or *.jpg.web?

    serpentdriver

    (@serpentdriver)

    Why would it affect only this particular page?

    As already said, the maker of your theme uses different CSS at this URL depending on browser or User-Agent. The UCSS Generator doesn’t know this, therefore he uses the CSS for default browser.

    serpentdriver

    (@serpentdriver)

    If an webp image doesn’t exist the original image is used, so you must enable webp Replacement function.

    serpentdriver

    (@serpentdriver)

    The plugin is not the problem. The problem seems to be UCSS. The creator of your theme seems to use different styles depending on the user-agent. The UCSS generator cannot know this, so the easiest way to solve the problem is to exclude the affected URL from using UCSS. You can find the exclusion function under Page Optimization -> Optimize CSS. If done, purge the cache and check if it works.

    serpentdriver

    (@serpentdriver)

    Thank you for the code, but I think I’m doing something wrong because the images are still appearing as jpg.

    No, you are doing nothing wrong. It’s the code. It is magic. 🙂

    This code leaves the file extension unchanged, but actually loads a webp image if the browser supports webp images. Paste the code back into the .htacces and I’ll show you the magic effect.

    serpentdriver

    (@serpentdriver)

    The cache plugin doesn’t modify any css. If there are CSS-related issues, then all browsers must be affected. Therefore, check whether the problems also occur in other browsers.

    serpentdriver

    (@serpentdriver)

    You should read this to better understand what Guestmode is and what is it good for:

    https://blog.litespeedtech.com/2021/06/01/guest-mode-for-wordpress-in-lscwp-v4-0/

    serpentdriver

    (@serpentdriver)

    It seems your theme is either a “webp” theme or you or anybody else has added this code. Check upload directory and all subdirectories if there is a .htaccess. If yes, check if there is such code in these/this .htaccess.

Viewing 15 replies - 16 through 30 (of 2,151 total)