Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Support for lazy-loading CSS background images in img menu

Home / Forums / Virtue Theme / Support for lazy-loading CSS background images in img menu

This topic is: Not a support question
[Not a support question]
Posted in: Virtue Theme
January 15, 2019 at 3:31 am

Hi Ben,

we make intensive use of lazy-loading images but also use the img menu with size set to height sometimes so that the image is part of the background. FWIW, I noticed that with the very recent version the lazy load plugin now also supports lazyloading background images. What’s needed is to set some css and data- classes on the background container. See here for details:

The element must have the class rocket-lazyload-bg, and a data-bg attribute, which value is the CSS url for the image.

Lazy loading support is already superb in Virtue. Would be great if this could be added to img menu too whenever it is *not* using size=imgSize, that is, background image.

Thanks and kind regards!

  • The forum ‘Virtue Theme’ is closed to new topics and replies.