Hi @ruenel,
I’ve contacted Imagify and got an interesting reply. I think this might a battle between ThemeCo and Imagify: how’s going to be the first to really support the next-gen techniques. The ‘cover’ method seems to be tricky setting that works in traditional CSS with <img>
attributes but not always with <picture>
attributes. Is this something that has come up for discussion in the dev team?
I know the theme.co team is always trying to embrace new standards. Usage of <picture>
might be something to take into consideration?
To address the issue where the 'cover' CSS attribute is not applied when WebP images are enabled through Imagify, you might need to adjust the method used for displaying WebP images on your site. Imagify provides two main methods for displaying WebP images:
1. **Using `<picture>` Tags**
2. **Using Rewrite Rules**
If you are currently using the `<picture>` tag method, it might be causing compatibility issues with your theme's CSS, particularly with properties like 'cover'. Switching to the **rewrite rules** method could resolve this issue as it doesn't alter the HTML structure as much as the `<picture>` tag method does.
Here’s how you can switch to using rewrite rules:
1. Go to your Imagify settings in your WordPress dashboard.
2. Locate the option for **“Display images in Next-Gen format on the site”** and select the **rewrite rules** option.
3. Save your changes and clear all caches (browser cache, site cache, etc.).