Title: exclude first image in posts
Last modified: February 10, 2021

---

# exclude first image in posts

 *  Resolved [Host Domination](https://wordpress.org/support/users/ilithio/)
 * (@ilithio)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/)
 * hi, the plugin is great. I don’t know why, but the first image of my page in 
   above the fold, despite having been “excluded” as a class and setting lazy load(
   excluding the first image of pages) it takes at least 1 second to load. How can
   I go about completely excluding an image class from Autoptimize caching?

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/#post-14031645)
 * Can you share a URL so I can take a look ilithio ?
 *  Thread Starter [Host Domination](https://wordpress.org/support/users/ilithio/)
 * (@ilithio)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/#post-14031698)
 * [https://rebrand.ly/sdfasdfsadfasdf](https://rebrand.ly/sdfasdfsadfasdf)
    I am
   using GTMetrix (video loading and i see a block/pause time about 0,5 seconds 
   for loading first image…). The GTMetrix result performance is here: [https://rebrand.ly/1obw2vk](https://rebrand.ly/1obw2vk)
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/#post-14031997)
 * Had a look at the the HTML source of your live site, but AO’s lazyload is not
   active now ilithio ?
 *  Thread Starter [Host Domination](https://wordpress.org/support/users/ilithio/)
 * (@ilithio)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/#post-14032004)
 * i m testing without lazyload and it seems to be better without lazyload … unfortunately
   I realized, through yandex metrica, that many (not all, same) users, when I have
   lazyload active, they load the page without any image. For me it is a big problem…
   can you help me fix this?
    -  This reply was modified 5 years, 4 months ago by [Host Domination](https://wordpress.org/support/users/ilithio/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/#post-14032034)
 * I can try, but you’ll have to enable lazyload to start with 🙂
 *  Thread Starter [Host Domination](https://wordpress.org/support/users/ilithio/)
 * (@ilithio)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/#post-14032044)
 * ok done! i set “Lazy-load from nth image: 1”
    and class lazy load: “prima”
 * i m using WP super cache + cloudflare (rocketloader + css/js/html compress)
 * thank you a lot for your big support!
    -  This reply was modified 5 years, 4 months ago by [Host Domination](https://wordpress.org/support/users/ilithio/).
    -  This reply was modified 5 years, 4 months ago by [Host Domination](https://wordpress.org/support/users/ilithio/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/#post-14032113)
 * OK, can you try excluding `uploads/2021/02/Screenshot_1.jpg` instead?
 *  Thread Starter [Host Domination](https://wordpress.org/support/users/ilithio/)
 * (@ilithio)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/#post-14032129)
 * it is already excluded. It has the “prima” css class which I set in the plugin
   to exclude from loading.
    EDIT: anyway ok, i set “Screenshot_1” in excluded image.
   can you check it?
 * EDIT2: Is it possibile set in every post/page in my wordpress the first image
   with a class “ajax-loader” automatically by functions.php?
    -  This reply was modified 5 years, 4 months ago by [Host Domination](https://wordpress.org/support/users/ilithio/).
    -  This reply was modified 5 years, 4 months ago by [Host Domination](https://wordpress.org/support/users/ilithio/).
    -  This reply was modified 5 years, 4 months ago by [Host Domination](https://wordpress.org/support/users/ilithio/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/#post-14032243)
 * yes, it is now not lazyloaded.
 * reason why your other config did not take:
    1. it is not the first image (so 
   setting it to 2 or 3 should work) 2. prima is not a class of the image node, 
   but of the parent but parent nodes are not taking into account
 * frank
 *  Thread Starter [Host Domination](https://wordpress.org/support/users/ilithio/)
 * (@ilithio)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/#post-14032303)
 * thank you a lot! <3
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/#post-14032309)
 * you’re welcome, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂
 * have a nice evening,
    frank

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

The topic ‘exclude first image in posts’ 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/)

 * 11 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-first-image-in-posts/#post-14032309)
 * Status: resolved