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 picture #1109

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

patrickschaper
Copy link

@patrickschaper patrickschaper commented Oct 6, 2020

This merge request adds a desired feature: Lazy loading for picture/source elements.
This feature is important as srcset attribute cannot handle pixel density and viewport width at the same time.

patrickschaper and others added 3 commits October 6, 2020 15:38
- Allow picture source tags to be lazy loaded
- updated source tag test
- not setting src attribute if none preset
- check img tag name before setting property 'src'
marcamos added a commit to fromtheoutfit/flickity that referenced this pull request Nov 9, 2020
@marcamos
Copy link

marcamos commented Nov 9, 2020

This just saved me – thank you @yesman82! @desandro this should definitely be merged in order to support <source> elements.

@desandro desandro self-assigned this Jan 13, 2021
@desandro desandro added this to the v3 milestone Jan 13, 2021
@desandro
Copy link
Member

Thank you so much for this contribution. I plan on working on Flickity again in 2021. This feature will be evaluated for merging in then. Thank you for your patience.

@luksak
Copy link

luksak commented Jan 19, 2021

This fixes the issue for me. Thank you!

@luksak
Copy link

luksak commented Jan 19, 2021

As a side-note: I wasn't able to get this to work with flickity-fade. But that probably has to do with my lack of npm foo 😄

@tobipch
Copy link

tobipch commented Apr 28, 2021

I'd strongly welcome if this feature would be merged into Flickity.
We really need to use the picture tag instead of the img tag because we have to control when which image gets loaded as they have different aspect-ratios.

@Samuell1
Copy link

Any info on this? @desandro Thanks!

@5BYFIVE
Copy link

5BYFIVE commented Jul 6, 2021

Used this update today to help speed up a client site using picture tag for displaying different images for mobile/desktop. This should definitely make it into the main branch!

@bansavage
Copy link

It's been 5 years since original issue --> #161 (comment)

Can we please merge this and create a release?

@Cipscis
Copy link

Cipscis commented Aug 18, 2021

I'd like to see this pull request merged so I can use the element to implement support for serving WebP images in supported browsers when using Flickity.

@gauravmanerkar
Copy link

Hi,

When this PR will get merged?

desandro added a commit that referenced this pull request Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

10 participants