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

Picture tag can now handle an inside img tag if it exists #225

Merged
merged 3 commits into from Sep 6, 2020

Conversation

srogier
Copy link
Contributor

@srogier srogier commented Jan 10, 2020

This PR will allow to picture tag like this.

<picture
    class="lozad"
    data-iesrc="https://example.org/foo.jpg">
    <source type="image/webp"
            data-srcset="https://example.org/foo.webp"
            class="lozad" />
    <source type="image/jpeg"
            data-srcset="https://example.org/foo.jpg"
            class="lozad"/>
    <img src="data:image/jpeg;base64,/some_lqip_in_base_64==" />
</picture>

With this code, I can use a lazy-loaded <picture> tag, with an LQIP and delegate the lazy-load to the <source> tags inside the <picture> tag

@nickreese
Copy link

Would love to see this merged in. Thank you for your work. :)

@MBehtemam
Copy link

what happen for this PR , I think it's useful to have this in library.

@nickreese
Copy link

Checking in on this again. Lozad is our preferred solution but we need LQIP support.

@srogier
Copy link
Contributor Author

srogier commented Aug 31, 2020

Yes, it's too bad this PR isn't merged.

If that can reassure you, this code runs on prod since last february without any issues.

@ApoorvSaxena
Copy link
Owner

@srogier will be great if you can get the following done, will get this merged ASAP:

  • update README.md with feature implementation
  • build and update dist files to resolve their conflict

Bonus points to accompany test cases with PR 💯

@srogier
Copy link
Contributor Author

srogier commented Sep 5, 2020

PR is now update from master @ApoorvSaxena with a new build

I add some documentation.
I also tried bonus points with testing, but I wasn't very inspired

@ApoorvSaxena ApoorvSaxena merged commit 83fd88b into ApoorvSaxena:master Sep 6, 2020
@ApoorvSaxena ApoorvSaxena mentioned this pull request Sep 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants