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 doesn't support multiple formats #962

Closed
MattWilcox opened this issue Jul 5, 2019 · 2 comments
Closed

lazyload doesn't support multiple formats #962

MattWilcox opened this issue Jul 5, 2019 · 2 comments

Comments

@MattWilcox
Copy link

MattWilcox commented Jul 5, 2019

WebP is an important thing these days; if you're not using it you'll get hurt by Google. Adding webp with a jpg fallback is nice and easy with a < picture > element, but both Picture and multiple file formats don't appear to be something Flickity supports?

`

<source media="(max-width: 479px)"  data-srcset="{{ max479jpg.url }}"  type="image/jpeg">
<source media="(min-width: 1500px)" data-srcset="{{ min1500jpg.url }}" type="image/jpeg">
<source media="(min-width: 1280px)" data-srcset="{{ min1280jpg.url }}" type="image/jpeg">
<source media="(min-width: 960px)"  data-srcset="{{ min960jpg.url }}"  type="image/jpeg">
<source media="(min-width: 700px)"  data-srcset="{{ min700jpg.url }}"  type="image/jpeg">
<source media="(min-width: 480px)"  data-srcset="{{ min480jpg.url }}"  type="image/jpeg">

<img
	loading="lazy"
	class="lazyload"
	data-src="{{ min1280jpg.url }}"
/>

`

Sorry; I do not know why Github isn't displaying the code above correctly - seems to choke on picture tags.

@desandro
Copy link
Member

desandro commented Jul 7, 2019

Thanks for reporting this issue. I'm tracking this in #172

@kbav
Copy link

kbav commented Aug 6, 2019

@desandro I think you're technically tracking this with #161 . Commenting to leave a breadcrumb trail for whoever else may be looking for <picture> tag and/or multi-format / webp support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants