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?
]]>Can I do that?
Thank you
Kim
However, once Jetpack tiled galleries are enabled & used the link reverts to the full size attachment.
I wonder if any guidance could be given to get this working with Jetpack?
Many thanks!
]]>Does anyone know how to do that?
I’ve checked around and all I could find were old posts that suggested using this:
function wpb_imagelink_setup() {
$image_set = get_option( 'image_default_link_type' );
update_option('image_default_link_type', 'file');
}
add_action('admin_init', 'wpb_imagelink_setup', 10);
but this doesn’t work.
Any ideas?
]]>Thank You
]]>