- This topic has 9 replies, 4 voices, and was last updated 2 years, 11 months ago by Elvin.
-
AuthorPosts
-
October 19, 2020 at 11:48 am #1496046Carlo
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
October 19, 2020 at 5:12 pm #1496324ElvinStaffCustomer SupportHi,
I see that you’re using
"use <picture> tag"
setting on your Imagify plugin. I’m afraid that’s not going to work aspage-hero
‘s image is added throughbackground-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
.October 20, 2020 at 12:23 am #1496526CarloHi 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
CarloOctober 20, 2020 at 9:50 am #1497377TomLead DeveloperLead DeveloperThe
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?
October 20, 2020 at 10:01 am #1497391CarloHi 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. π
October 20, 2020 at 1:46 pm #1497632TomLead DeveloperLead DeveloperGlad you got it sorted! π
April 14, 2021 at 5:18 pm #1734688ChadHi Tom,
I’m in a similar situation – using Imagify but with Cloudflare CDN, so I am not able to update and use the “rewrite rules” with Imagify plugin.
Yes, the webp image URLs match the original image URLs with the extension being the only thing that changes and it looks like:
http://www.domain.com/file.jpg
updates to
http://www.domain.com/file.jpg.webp
I’m having the issues with the hero background images showing up as .jpg.
Your help and tips are appreciated.
Thanks!
Chad
April 14, 2021 at 5:20 pm #1734692ElvinStaffCustomer SupportHi there,
Please see Imagify’s answer to this here:
https://wordpress.org/support/topic/serving-background-images-in-webp-2/#post-12994046April 14, 2021 at 5:23 pm #1734694ChadShoot… okay thanks Elvin!
April 14, 2021 at 5:28 pm #1734698ElvinStaffCustomer SupportNo problem. Glad to be of any help. π
-
AuthorPosts
- You must be logged in to reply to this topic.