How to serve WebP when linking the image to the media file
-
Hi,
I use LiteSpeed Cache 3.4.2 with WordPress 5.5.1.
Create WebP Versions and Image WebP Replacement options are both set to “ON”.
WebP generation works when I create an image block using the WordPress default block editor. I see on the page that the images are served in WebP formats.But my problem is that when I select the image block in the block editor, and I set the image to link to the media file, then when I click on the image, it will link to the original jpg file, and not to the WebP version.
I verified that WebP versions are generated for full size images as well.
Suppose I set the image to link to the media file when clicking on the image, and the original media file is /wp-content/uploads/2020/09/media-file-full-size.jpg.
I verified that /wp-content/uploads/2020/09/media-file-full-size.jpg.webp does exist.
How could I achieve that when I select the linking option for an image block in the block editor to link to the media file, then the link will actually point to the WebP version,and not the original jpg version?
I could do this manually, but that would be time consuming. I would like to use the default block editor when selecting the image linking option.
Maybe LiteSpeed Cache WebP generation is not fully compatible with the block editor yet?
- The topic ‘How to serve WebP when linking the image to the media file’ is closed to new replies.