• Resolved Anonymous User 14978628

    (@anonymized-14978628)


    Hi,

    When i set the global site background using the theme customizer, the background image doesn’t display as WebP.

    All my other images display as WebP, just not my background.

    Can you confirm if this is happening for you also?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Can you please provide a link to your site.

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Sure:

    https://www.celebrityhealthcritic.com/

    The image is background-compress-2.jpg

    That image is defined in a CSS file as such:

    background-image: url(https://www.celebrityhealthcritic.com/wp-content/uploads/2018/06/Background-Compress-2.jpg);

    Therefore, Cache Enabler is unable to parse the image in order to return its WebP version. Images must be defined in the HTML in order for Cache Enabler to be able to catch them.

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Your comment allowed me to identify and solve the problem. Thanks

    Could you share your solution? Thanks in advance!

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Sure, insert your background as a preload in your theme header.php.

    You will need to reload the page to generate the cache and see the webp version:

    <link rel=”preload” href=”https://www.&#8221; as=”image”>

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WebP Background Image’ is closed to new replies.