lazysizes
lazysizes copied to clipboard
Manage background image -gradient
Using gradient with background image now will be preserved
<div class="lazyload"
style="padding-bottom: 40%; background-image: linear-gradient(0deg, rgba(17, 17, 17, 0.2), rgba(17, 17, 17, 0.2)), url('data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==')"
data-bgset="image.jpg">
</div>
it becames
<div class="lazyloaded"
style="padding-bottom: 40%; background-image: linear-gradient(0deg, rgba(17, 17, 17, 0.2), rgba(17, 17, 17, 0.2)), url('image.jpg')"
data-bgset="image.jpg">
</div>
Thank you. Sadly our stupid browsers do not support Array.from. (I know...)
What version of es do you want to support?
What version of es do you want to support?
ES5 / pre ES 2015. Currently we support IE9+ but that is primarily historic. (Everything that supports getElementsByClassName). But we could also discuss everything that supports MutationObserver.