• Resolved ledjack

    (@ledjack)


    hello,

    I use this page as an example, but it’s a general case.

    Although i did 100 % of the images as optimized (see my old post)

    -replacement is activ
    -srcset is activ

    only the jpeg are served…

    any idea ?

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

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

    (@qtwrk)

    Hi,

    your images are loaded by JS/CSS

    currently LSCWP can only reliably detect and replace images in HTML , but when images are loaded by JS/CSS, it may not be able to correctly detect and replace it.

    View post on imgur.com

    I have a small workaround if you are interested.

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

    add this code into top of your .htaccess, it will redirect images to loaded as webp under the hood , despite the image URL will remain unchanged , but it will be loaded in webp format if browser supports and webp file exists , to reduces the page size.

    Best regards,

    Thread Starter ledjack

    (@ledjack)

    ok, thank you i did it but when i look to the size of the loaded files, i am not sure it works…

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    OK , I see you have CDN , then please don’t use it , it will create issue.

    Best regards,

    Thread Starter ledjack

    (@ledjack)

    heu no, i dont have.. 🙂 i remove it long time ago

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Well , Yes, but you have LiteSpeed ADC in front , which is kind of like CDN that caches static resources like my screenshot

    View post on imgur.com

    that x-lsadc-cache: hit

    so if image is already cached by ADC, it will send to user directly , without going through rewriterule.

    Best regards,

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Webp Images not served’ is closed to new replies.