• Resolved emli42

    (@emli42)


    Hi there,

    I have a slight issue with the replacement of CSS background-images. As you can see in this screenshot, the first background-image (which is disabled) gets replaced, the second one, which is the one being displayed hasn’t been replaced.

    I have added the CSS class .page-hero to the WebP Attribute To Replace list in the LSC settings.

    Any help is much appreciated, thanks!

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

    (@qtwrk)

    Hi,

    the code for that part is

    preg_match_all( '#background\-image:(\s*)url\((.*)\)#iU', $this->content, $matches );

    if you look at your screenshot , the first background image will match , but second doesn’t because there is some string “linear-gradient …” in between so failed

    will advice our devs to add detection in such case.

    Best regards,

    Thread Starter emli42

    (@emli42)

    Thanks for the prompt reply! For the moment I’ve disabled the overlay and made the area behind the text itself darker so that the WebP image is used.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CSS background-image not being replaced’ is closed to new replies.