If you have background images loaded via data-src
You should replace data-src
with data-bg
in your markup/DOM
<!-- FROM -->
<div data-src="background.jpg">...</div>
<!-- TO -->
<div data-bg="background.jpg">...</div>
Alternatively, you could pass src
in the data_bg
option
new LazyLoad({ /* other options? */ data_bg: "src" });
If you have single background images loaded via data-bg
You must remove the url()
part from the data-bg
attribute values
<!-- FROM -->
<div data-bg="url(background.jpg)">...</div>
<!-- TO -->
<div data-bg="background.jpg">...</div>
If you have multipe background images loaded via data-bg
You must change the attribute to data-bg-multi
<!-- FROM -->
<div data-bg="url(background1.jpg), url(background2.jpg)">...</div>
<!-- TO -->
<div data-bg-multi="url(background1.jpg), url(background2.jpg)">...</div>
If you are using callback_reveal
You should replace it to callback_loading
. callback_reveal
still works but it will be removed in next versions
// FROM
new LazyLoad({ /* other options? */ callback_reveal: () => {} });
// TO
new LazyLoad({ /* other options? */ callback_loading: () => {} });
If you are using callback_set
You should replace it to callback_reveal
. callback_set
still works but it will be removed in next versions
// FROM
new LazyLoad({ /* other options? */ callback_set: () => {} });
// TO
new LazyLoad({ /* other options? */ callback_reveal: () => {} });