Open piotrbak opened 3 years ago
We should do the same for Used CSS as well.
This one will be difficult to implement without a big rewrite of the existing code in my opinion. It's also still in the old architecture, so we would take the opportunity to move it to the new one at the same time.
Maybe we can work on it, but it would fit more for a major version to be safer?
@piotrbak @Tabrisrp if we move convert_to_webp
buffer priority after lazyload
, and add data-bg
to the target markup, we should be able to achieve that without requiring any major overhaul of the code.
I tested that by moving covert_to_web
to 19 as a buffer priority (lazyload
has a buffer priority of 18), and added data-bg
to rocket_attributes_for_webp
. The conversion worked properly.
But it will be dependent of the images lazyload
feature though.
Is your feature request related to a problem? Please describe. When using WebP caching we are targeting most HTML images. We're not targeting the images set as background images of the HTML elements.
Describe the solution you'd like We could find them in the source and replace them with Webp version if exists