[Resolved] Page hero images webp format and fallback

Home Forums Support Page hero images webp format and fallback

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1496046
    Carlo

    Hi there,
    I am using the imagify plugin to convert our jpg images into webp format.
    So far so good. No problems with images in pages.
    But I have a problem with the jpg page hero image.
    Even though there is a converted webp version as with the other images, the jpg version is still served.

    Please see the home page in the link provided.

    I’d like the webp version to be served and a jpg version as fallback.
    How can I solve it?

    Thank you. Best wishes. Carlo

    #1496324
    Elvin
    Staff
    Customer Support

    Hi,

    I see that you’re using "use <picture> tag" setting on your Imagify plugin. I’m afraid that’s not going to work as page-hero‘s image is added through background-image css property.

    You can try setting Imagify to "use rewrite rules" and see if it works.

    As for dynamic fallback, I’m afraid there’s no default feature within the UI that does it.

    You may have to play around with generate_page_hero_background_image_url.

    A wise man once said:
    "Have you cleared your cache?"

    #1496526
    Carlo

    Hi Elvin,

    1) since the website is on nginx server I guess that rewrite rules option can’t work. (just recently moved from apache)

    2) Is there any css solution?
    (with both webp and jpg fallback)

    3) Could you tell me more about playing around with “generate_page_hero_background_image_url.”?

    Thank you. Best wishes
    Carlo

    #1497377
    Tom
    Lead Developer
    Lead Developer

    The generate_page_hero_background_image_url allows you to manually filter the URLs used in the CSS – it could be handy.

    Do the webp image URLs match the original image URLs with the extension being the only thing that changes?

    #1497391
    Carlo

    Hi Tom,
    thank you for your reply,
    I have just fixed it 5 minutes ago editing the nginx configuration with the support of the hosting provider.

    Again thank you for your help, I really appreciate the way I feel supported here. πŸ™‚

    #1497632
    Tom
    Lead Developer
    Lead Developer

    Glad you got it sorted! πŸ™‚

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