Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LazyLoad images option for Slider Block. #2174

Open
Brandonbr1 opened this issue Apr 10, 2024 · 1 comment
Open

LazyLoad images option for Slider Block. #2174

Brandonbr1 opened this issue Apr 10, 2024 · 1 comment
Labels
doc-needed This issue requires documentation updates or additions once it has been completed. new feature Request for a new feature or functionality to be added to the project.

Comments

@Brandonbr1
Copy link

Brandonbr1 commented Apr 10, 2024

What problem does this address?

When I make an image using Otter "slider block", it does not add loading="lazy" or loading="eager" tags to indicate how it should be loaded. Say for instance, we have a slider that's more to the bottom of the page and can't be seen until we scroll down decently far below the page lazy loading would be perfect. Or if the image is closer to the top, it should use loading="eager". Adding both of these options depending on where the slider is can increase FCP and page speed scores.

Example for lazy loading:

<img loading="lazy" decoding="async" class="wp-block-themeisle-blocks-slider-item" src="imageurlhere" data-src="imageurlhere" alt="" title="" data-id="362">

Eample of eager loading

<img loading="eager" decoding="async" class="wp-block-themeisle-blocks-slider-item" src="imageurlhere" data-src="imageurlhere" alt="" title="" data-id="362">

Docs about this

Mozilla Lazy Loading
Explanation on the differences between the two

What is your proposed solution?

We can simply have 2 checkboxes. One asking if you want lazy load [x] or eager loading [x] for the image. If one of these is checked, we apply the respective image tag. If none is selected however, we don't apply any image tag and leave it with no tag.

Will this feature require documentation? (Optional)

Yes, it requires documentation.

Thanks,
Brandonbr1

@Brandonbr1 Brandonbr1 added the new feature Request for a new feature or functionality to be added to the project. label Apr 10, 2024
@pirate-bot pirate-bot added the doc-needed This issue requires documentation updates or additions once it has been completed. label Apr 10, 2024
@ineagu
Copy link
Contributor

ineagu commented Jul 9, 2024

Thanks! I think is best for an image optimization plugin to handle that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-needed This issue requires documentation updates or additions once it has been completed. new feature Request for a new feature or functionality to be added to the project.
Projects
None yet
Development

No branches or pull requests

3 participants