• Resolved hernan2022

    (@hernan2022)


    Hi,

    I’ve noticed that webp images are not displayed in Firefox. I’m attaching a screenshot of Edge and Firefox, where only jpeg is displayed

    Is it a bug? I’m using Cloudflare’s CDN

    Edge:

    Firefox:

    Thanks, regards

    • This topic was modified 3 months, 3 weeks ago by hernan2022.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support qtwrk

    (@qtwrk)

    because FF doesn’t send image/webp in its main request header , so plugin doesn’t know the browser supports webp or not

    Thread Starter hernan2022

    (@hernan2022)

    I understand, can I do something? I have the impression that it worked before

    Although I understand that the idea is for the browser to clarify this to the server. Can I understand this as a bug or problem with the browser and not a problem directly with the website or the plugin?

    Regards

    Plugin Support qtwrk

    (@qtwrk)

    it’s not really a bug , from code aspect, everything is working as desired , in human word/logic , it’s like:

    1. if browser sends request with header accept: .... image/webp to explicitly state it supports webp
    2. then plugin will try to use the webp file whenever possible
    3. on the other side , if browser doesn’t state accept: ... image/webp , it may or may NOT support webp , to be on the safe side , plugin will then , not , use the webp file , just in case , serving bigger size image is still better serving un-renderable image to browser

    the thing is FF now seems doesn’t send header with image/webp now , I remember it used to do that , like Chrome , you can see something like accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8

    that clearly state image/webp in request header

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

    you can try this , it will forcefully load the webp file if exists and browser supports , but CF will also cache the jpg URI with webp content which may end up in error for browser that doesn’t support webp

    but nowadays the chance for a browser not having webp is quite small though.

    Thread Starter hernan2022

    (@hernan2022)

    I understand,

    Thank you very much for the information and analysis

    It’s a shame that Firefox doesn’t do something so essential right. I have more than enough information to do tests and make decisions. I think I’m leaning towards leaving it as is, it makes sense that the litespeed plugin is betting on acting safe and prudent, even if there are few browsers that don’t support webp

    Thank you very much, greetings!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.