• Resolved econsorsn

    (@econsorsn)


    Hi,

    unfortunately the webP image replacement is not working well.

    All Settings for replacement are enabled and the image optimizer says that all images are generates as webP but they don’t get replaced.

    Anyway it was never working for background-images.

    Can you check the site and tell us, what we’re doing wrong?

    Thanks in advance,
    Sebastian

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Background images are big issue. Any clue how to deal with them as they are big part of my projects as well ??

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    yes, it was never working with background image

    basically , only images within <img ... tag will be replaced

    there is some improvement in next release for background images

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

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

    this will force to load webp when it exists and browser supports while URI remains unchanged, but format will be webp

    Best regards,

    Thread Starter econsorsn

    (@econsorsn)

    Hi,

    thanks for the reply.

    We’ve put the rules into the htaccess, but unfortunately it’s still not working.

    We are using LSC on many other websites hosted in the same or a similar hosting environment. It’s working well on all other pages excapt this one.

    Maybe you can further inspect this and help us to fix this.

    Regards,
    Sebastian`

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Is that rule still there ?

    what’s your server env ?

    Best regards,

    Thread Starter econsorsn

    (@econsorsn)

    Hi,

    yes, the rule is still there.

    What do you want to know about the server env?

    Apache/Litespeed Webserver
    PHP 7.3

    Regards,
    Sebastian

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I see you are running Plesk

    if I recall correctly , by default Plesk has nginx in front to serve static ?

    please verify if you have nginx running

    Best regards,

    Thread Starter econsorsn

    (@econsorsn)

    Hi,

    we’re not runnig nginx on this server.

    Regards,
    Sebastian

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    please provide the report nunmber , you can get it in toolbox -> report -> click “send to LiteSpeed”

    and also make sure you put this rule at top of your htaccess

    also try replace ,L] to ,END]

    Best regards,

    Thread Starter econsorsn

    (@econsorsn)

    Hi,

    we changed the position and made the changes to the code but images still don’t appear as .webp.

    View post on imgur.com

    Report number: SHPAAFNX
    Report date: 04/07/2021 11:42:48

    Regards,
    Sebastian

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    it worked

    I have already mentioned that :

    this will force to load webp when it exists and browser supports while URI remains unchanged, but format will be webp

    Best regards,

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WebP not working’ is closed to new replies.