-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Support (lazy) responsive images #184
Comments
@simonihmig thanks for the report 🎉 yes I'm 100% behind this plan and it is a technique that we're already investigating for other "empress" projects: empress/empress-blog-casper-template#16 😂 I would like to have a chat with you about a few things before we go ahead with this effort though 🤔 I wanted to work on a PR to ember-responsive-image to look at making it support "next-gen formats" too at some point. Also, I would be more comfortable implementing |
Hey @mansona!
Oh, that's cool!
Sure, feel free to ping me on Discord!
Indeed, that would be cool! Seems Have a few other improvements in my mind as well:
Yes! We can do that in multiple iterations... /cc @andreasschacht |
@simonihmig in fact the thing that I wanted to chat with you is mostly covered by simonihmig/responsive-image#50 (I think). Essentially when I was looking into this for empress-blog it was not 100% clear that there was a good match between where to put files and how to use them. I think we can discuss more on that existing issue 👍 At this stage I'm unlikely to be able to do much on this topic before emberconf 🙈 but I will re-engage with you on it afterwards 👍 unless you'll be going this year and we can have a chat about it over there 😉 |
Yes, we'll lay out details there. Feel free to chime in at any time!
Unfortunately, not able to come. Yet again... 😫😭 |
That's a shame! But we should arrange a call for soon afterwards 👍 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked stale. If this issue is something that still needs work, please add a comment and it will remain open, otherwise it will close in 7 days. You are welcome to open a new issue if you miss the window. Thanks! |
This is still valid 🙈 and I really need to catch up and have that call we discussed |
bad stale bot! with the new website release, all the images bring the home page's perf score down below 50 for US (and much worse for European folks). lazy images would be amazing here. though, this would support even older browsers (as well as many of todays browsers): https://github.com/kaliber5/ember-responsive-image |
Should we start adding |
We cannot serve webp exclusively: https://caniuse.com/#search=webp It would be possible to support webp with jpeg as fallback, using |
This is something that I do in my blog app to let the browser choose whichever it is compatible with. |
Does that still allow the jpg or svg to be used in case of old/legacy browsers like ie11 and Safari? |
Yes, I've got this working for jpg in Safari. I can double-check with IE11 with SVGs. Might help: https://css-tricks.com/using-webp-images/ |
@NullVoxPopuli , just released Firefox 75 adds support of image lazy loading. Lazy loading can a good addition to responsive images but not a replacement: we can still ask a browser to load an optimized version when an image enters a viewport. So, to sum up the discussion here, the ideal solution in terms of performance looks like this:
|
With regards to WebP, I would not recommend using it while it is not supported by all the major browsers (e.g. Safari and iOS Safari) and supported legacy browsers (IE11). Even if we can fallback to other bitmap formats (e.g. PNG) using |
This issue has been automatically marked stale. If this issue is something that still needs work, please add a comment and it will remain open, otherwise it will close in 7 days. You are welcome to open a new issue if you miss the window. Thanks! |
Many of the images here are not optimized well enough, leading to rather bad Lighthouse scores. Just an example of an image, that is naturally 500px wide, but displayed only at 182px:
Here the Lighthouse "Opportunities" suggestions for some image heavy pages:
https://ember-beta-website.netlify.com/ember-users
And this for https://ember-beta-website.netlify.com/mascots:
We have used some home-grown addons in some projects, and are quite happy with is so far:
This would also offload the burden to create optimized images when adding new assets from the contributor to the build process.
If there's interest in this, I could put a PoC PR together for one of the image heavy pages!
The text was updated successfully, but these errors were encountered: