No images load in browsers that don't support media queries
See original GitHub issueFound an error when doing some testing in IE9 - no images at all. From the look of things, it’s because it doesn’t support media queries, or specifically matchMedia:
SCRIPT438: Object doesn't support property or method 'matchMedia'
loading-attribute-polyfill.min.js?ver=1.1.0, line 5 character 1942
I wouldn’t expect a first-class lazyloading experience in such an old browser, but ideally images would err on the side of loading inefficiently instead of failing, just like older browsers without IntersectionObserver.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
When using @media queries, does a phone load non-relevent ...
I believe that typically, mobile devices will load all images even if they don't apply to its own particular media size. Meaning it...
Read more >Prevent wasteful hidden image requests (display: none)
We often hide images using CSS with "display: none", but this doesn't actually prevent the browser from downloading these images.
Read more >Responsive images - Learn web development | MDN
You may have noticed that the last slot width has no media ... Older browsers that don't support these features will just ignore...
Read more >srcset vs media queries : Which Should You Use & Why?
A detailed comparison: srcset vs media queries. Both tools can help you with the problem of "responsive images". Which one to use and...
Read more >Optimize CSS background images with media queries - web.dev
Use media queries to send images that are only as large as they need to be, a technique commonly known as responsive images....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks!
Okay, no hassle. I‘ll even also make a npm release soon, so than it could get retested this way as well.
I did test it on a local Virtual Machine successfully.