Support » Plugin: Native Lazyload » Also an issue with Recent Posts FlexSlider by WooThemes

  • The slider had dynamic height depending on the size of the image an potential caption. With this plugin enabled the height seems to become fixed and cuts off every image.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Felix Arntz


    For sliders, I recommend skipping the images from being lazy-loaded, by adding a CSS class skip-lazy to them. Do you happen to know if FlexSlider adds a specific class to its images itself? If so, I could at that class to the blacklist, so that these images wouldn’t be lazy-loaded by the plugin.

    Native lazy-loading via the loading attribute at the moment only lazy-loads images that are actually outside of the viewport anyway, so not those in e.g. a slider.

    I’m not quite as versed in WordPress and its plugins as Matt is, but the problem does seem to be the order in which things get loaded.

    If I add “skip-lazy” to the img class in the flexslider, nothing happens. Safe assumption: The native lazyload does its thing first.

    If I change your hard-coded variable (const SKIP_LAZYLOAD_CLASS = ‘skip-lazy’) to one of the classes on the images (like (const SKIP_LAZYLOAD_CLASS = ‘wp-post-image’ — which would be useless, since I imagine all images get that class), then it works.

    I’m open to any and all suggestions. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.