I manged to fix it. I used the option "Use <picture> tags (preferred)" before and it broke the theme. I am now using "Use rewrite rules" option in settings and it is fixed now.
Hi Phill, we had the same issue, with WP-Rocket, in WebP image implementation via Imagify
So far we have solved it by not using <picture> tags method and moving to "Use rewrite rules" option in settings as mentioned above
Having said that, this is the answer we received from the WP-Rocket support team
I hope this helps for future theme optimizations
If the issue is happening because of WebP display option it means that your theme does not handle <picture> tags as same as <img> tags. When using WebP display option (using <picture> tags), the HTML output is changed by wrapping up <picture> tag on top of <img> tag. The CSS code that handles <img> tag is not applied properly in that case. It would be ideal to contact your theme provider and ask them to check this in more detail, as it would be great improvement for their theme to make full compatibility for using picture tags.
We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.
Cookies are small text files that can be used by websites to make a user's experience more efficient.
The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.
This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.
You can at any time change or withdraw your consent from the Cookie Declaration on our website.
Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.
Please state your consent ID and date when you contact us regarding your consent.
Comments
Please, turn off all of the plugins, refresh your cache and check if the issue still exist.
Thanks
Is there anything else I could help you?
Greetings
Hi Phill, we had the same issue, with WP-Rocket, in WebP image implementation via Imagify
So far we have solved it by not using <picture> tags method and moving to "Use rewrite rules" option in settings as mentioned above
Having said that, this is the answer we received from the WP-Rocket support team
I hope this helps for future theme optimizations
If the issue is happening because of WebP display option it means that your theme does not handle <picture> tags as same as <img> tags. When using WebP display option (using <picture> tags), the HTML output is changed by wrapping up <picture> tag on top of <img> tag. The CSS code that handles <img> tag is not applied properly in that case. It would be ideal to contact your theme provider and ask them to check this in more detail, as it would be great improvement for their theme to make full compatibility for using picture tags.
Thanks for the good work!
Hi @Imaginity,
Thanks for letting us know. We appreciate that.
I have passed this to the dev team, and we will look closely at this topic.
Best regards