First: Have you tried both methods of Alter HTML ? (I mean both “Replace
tags with <picture> tags, adding the webp to srcset.” and “Replace image URLs”).
The Alter HTML feature was primarily created for those case where serving varied image responses was a problem (ie on Nginx without access to server config or when on CDN which cannot be set up to allow two different types on same URL).
An extra bonus of alter HTML is that when users right-click the image and save it to disk, it will have the correct extension. With varied image responses, on webp-enabled browsers, there is a discrepancy between file extension and image type.
Performance-wise, the gain of enabling Alter HTML in “Varied image responses” mode is insignificant and hardly measurable.
Actually, if you are not using page caching, it will be better performance-wise to disable Alter HTML as the Alter HTML feature increases the “time to first byte” (TTFB). Especially on pages with many images on it.
Hi,
I’m using WooCommerce with a premium theme so there’re many images heavily as well as additional jQuery.
The “Replace Image URLs” has no catching support limitations and I will use Litespeed plugin as the host’s cache manager works best with it. So I’ve discarded this option.
Else if I check to alter HTML using “Replace tags with <picture>” then the website gets issues with the theme functionality because of HTML structure alternation.
So the last choice left is to don’t enable “Alter HTML” feature. In that case, I’m wondering will this work almost equally?
Also, in the case of “Convert on upload” unchecked, the site loading reaches up to 1 minute for 14 webP images worth 2.75MB and no prior browser caching. Is that normal?
Here is the page for your kind consideration: https://www.craftesy.com.
Thanks
I shall then recommend that you disable “Alter HTML”. As I said, the option does not get you better performance, but might get you worse.
I shall also recommend that you convert all images with Bulk convert. After the bulk conversion, the webp’s will be delivered directly (make sure you enable “Enable direct redirection to existing converted images?”). In addition to this, I recommend you enable “Convert on upload”. Uploading will take a bit longer, but it is worth it, because it prevents the situation you describe where you have 14 unconverted images on a page.
Hi,
Disabling the “Alter HTML” is better as I made a few tests.
Thanks