Site logo

Archived topic

Disable lazy load Dispatch header image

3 replies · Started by Matt on May 6, 2022

Viewing posts 1–4 of 4

Hi,

I use the dispatch theme and I'm lazy loading images. I'd like to find a specific class/attribute from the page hero/header used in the theme or wp show posts block so I can disable lazy loading of these images.

Could you take a look and see if there are any classes for this specific imageset I can use, or any way I can add a class?

I hope this makes sense.

Also, there was word of a new dispatch style magazine/niche site theme a year ago, any updates on new themes? Lightweight with the ability to show related/popular posts in the sidebar, homepage, under articles, and in-article would be really helpful.

Hi Matt,

You can use this class: .wp-show-posts-image img

Also, there was word of a new dispatch style magazine/niche site theme a year ago, any updates on new themes?

We just released the Alpha version of GenerateBlocks 1.5 which has a query loop block.

We will be building blog sites using GB's query loop block once the master version is released.

Currently it can not show related posts or popular posts though.

Thanks for the reply.

The .wp-show-posts-image class is used for every wp show posts image though, right? Does that mean every image on the home page won't be lazy-loaded, not just the above-the-fold images? The idea is not to lazy load what displays immediately on page load, and the rest can be lazy-loaded.

That sounds good, can't wait to see. Just gonna add an opinion that related and popular posts are mentioned as something wanted, they're really core to a lot of sites that use GP, and we'll end up using a third-party tool like wp show posts for it anyway.

Hi there,

you would need to check with the Lazy loader developer to see if its possible to use a nested CSS Selector.
A lot of lazy loaders only target classes or attributes on the <img> element. Which is no good in this instance.
I know Perf matters uses filter hooks so it can be used to target more complex selectors such as:

.page-hero .wp-post-image

Which would hit all featured images inside the Header Element.

This archived topic is closed to new replies.