• Resolved xscorpionx

    (@xscorpionx)


    I have activated the option in Litespeed Cache so that the images load in webp when the header accepts it, the problem is that when the widgets are ESI the images do not load in webp, I imagine that the optimization of images does not work when it is an ESI block. Could it be a bug? o Why is this happening? Has anyone else had this problem?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Yes, your guess is correct. Loading webp images in ESI is currently not supported.

    Thread Starter xscorpionx

    (@xscorpionx)

    And there is no snippet that can solve this, for example, if the header accepts webp, add .webp at the end of urls that don’t have it?

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    this is known issue that ESI sub-request will bypass all the optimization features

    it is on our to-do plan

    if you are not using any CDN service , you can add this into your .htaccess as workaround

    RewriteCond %{HTTP_ACCEPT} "image/webp"
    RewriteCond %{REQUEST_FILENAME}.webp -f
    RewriteRule ^(.*).(jpg|jpeg|png|gif) $1.$2.webp [T=image/webp,L]

    this rule will force to load webp when browser supports and file exists, despite the URI will remain unchange, but the format will be webp

    Best regards,

    Thread Starter xscorpionx

    (@xscorpionx)

    Yes I use CDN, so it does not work for me, but thanks for trying, surely someone who does not use CDN will do.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    okay , certain CDN like BunnyCDN can have webp vary support , which is also compatible with this ruleset , for you info

    Best regards,

    Thread Starter xscorpionx

    (@xscorpionx)

    Thanks a lot!!! Yes now!!! When he told me that, I have gotten into KeyCDN and activated Cache Key WebP, then in Litespeed cache I deactivated creating webp versions, I activated it again and now the images, although they do not end with webp, are the webp versions, with the same size and in the response header puts content-type: image / webp. Thanks a lot!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem with the images in the ESI widget’ is closed to new replies.