Title: Exclude class from lazy load
Last modified: May 21, 2019

---

# Exclude class from lazy load

 *  Resolved [akedv](https://wordpress.org/support/users/ak71/)
 * (@ak71)
 * [7 years ago](https://wordpress.org/support/topic/exclude-class-from-lazy-load/)
 * Hi,
 * what’s the right context to exclude classes from lazy load? I tried all kinds
   of combinations, but none seems to work:
 * .similarpost or similarpost or “.similarpost img” or “similarpost img” or “similarpost
   a img”
 * eg on this page: [https://www.china-smartphones.eu/angebote/smartphones-angebote/vivo-y95-guenstig-kaufen-preisvergleich/](https://www.china-smartphones.eu/angebote/smartphones-angebote/vivo-y95-guenstig-kaufen-preisvergleich/)
 * right after “Ähnliche Produkte:” the images are “missing” (just after activating
   the lazyload option), so I want to exclude these images from being lazyloaded,
   or is there any other way to get these pictures displayed again?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years ago](https://wordpress.org/support/topic/exclude-class-from-lazy-load/#post-11555624)
 * The lazyload exclusions only work for attributes (and values) that are in the`
   <img` tag itself, so some possible workarounds:
    * check if you can add a specific
   class for images in similar post logic (plugin?) * alternatively add one specific
   string to all those images’ alt/ title tags and add that specific string to the
   list lazyloading exclusions * or exclude the images used in the lightbox based
   on their filename
 * hope this helps,
    frank
 *  Thread Starter [akedv](https://wordpress.org/support/users/ak71/)
 * (@ak71)
 * [7 years ago](https://wordpress.org/support/topic/exclude-class-from-lazy-load/#post-11555658)
 * ok, the easiest way was to use the filename: star.png,100×100.jpg fixes the problem,
   thanks!
 * but why are these images missing in the first place?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years ago](https://wordpress.org/support/topic/exclude-class-from-lazy-load/#post-11555926)
 * Lazyload uses JS to do it’s work, I suppose that for the similar post-display
   some JS is used as well and that this conflicted?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Exclude class from lazy load’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/exclude-class-from-lazy-load/#post-11555926)
 * Status: resolved