HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
scottjehl
picturefill
JavaScript2012–2015
scottjehl / picturefill · Archived

picturefill

A responsive image polyfill for <picture>, srcset, sizes, and more

10Distinct people
11Mentions
0Explicit recommenders
9.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A responsive image polyfill for <picture>, srcset, sizes, and more

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year11 dated mentions

Observed mentions: 2012-03-27 19:00:52 UTC to 2015-08-20 11:57:35 UTC.

012342012-01-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20122013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2015

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20122012-01-01 00:00:00 UTC2013-01-01 00:00:00 UTC404
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC110
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC211
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC413

What Hacker News says

11 sources
All links in above txt: 1. The repo for the boilerplate is: https://github.com/MozaikAgency/wp-theme-bootstrap 2. The helper mentioned: https://github.com/MozaikAgency/wp-theme-bootstrap/blob/mast... 3. Code demoing how the helper would be used: https://github.com/MozaikAgency/wp-theme-bootstrap/blob/ccdf... 4. Resp images polyfill - PictureFill: https://github.com/scottjehl/picturefill 5. lazy-loading content js lib - lazySizes: https://github.com/aFarkas/lazysizes 6. object-fit polyfill - Object-fit: https://github.com/anselmh/object-fit 7. Vote for object-fit to be included in IE: https://wpdev.uservoice.com/forums/257854-microsoft-edge-dev...
In WordPress theme boilerplate, now with responsive(+lazy-loading) image helpers
maxpanas·Jul 27, 2015Submission

WordPress theme boilerplate, now with responsive(+lazy-loading) image helpers

The repo for the boilerplate is: https://github.com/MozaikAgency/wp-theme-bootstrap The helper mentioned below: https://github.com/MozaikAgency/wp-theme-bootstrap/blob/master/theme/library/class… Code demoing how the helper would be used: https://github.com/MozaikAgency/wp-theme-bootstrap/blob/ccdfb983676a94b5ff74e9ad43… Apart from the core feature of the theme starter, which is the robust build process, the theme boilerplate also comes with a small but growing library of helper classes for developing modern themes with WordPress. The latest addition to this library is a small responsive images/background-images class which leverages the responsive images spec (polyfilled via picturefill (https://github.com/scottjehl/picturefill)) and the WordPress custom media sizes to make it a little easier to implemen
Read the rest
t responsive images in your WordPress theme. The helper also supports aFarkas' lazySizes javascript library (https://github.com/aFarkas/lazysizes) to optionally lazy-load specific images. Finally the default configuration of the theme boilerplate also includes anselmh's object-fit polyfill (https://github.com/anselmh/object-fit) to allow you to use the object-fit css properties on your images. (btw please vote for this feature to be included in IE Edge!: https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/626…) That's all. We use this boilerplate at work everyday on new projects. Hope you find it useful/interesting!
1 points · Open discussion
This is a horrible suggestion. Stop being careless with your users' bandwidth. Assuming that every client should get the highest-resolution (and thus highest-bandwidth and highest-memory-cost) assets is just lazy. Use Javascript. Something like https://github.com/scottjehl/picturefill works beautifully and results in only one request per asset, with a noscript fallback. It's more markup, which is kind of a pain in the ass, but it means that the right clients get the right assets and you don't end up destroying your poor EDGE and 3G customers because you decided they needed a 2400x1200 splash image. Let's not forget that a "retina" image imposes a 4x memory cost on the client - image data has to be decompressed to be displayed. So, your user on their mobile phone with 512mb of RAM is going to have a terrible experience when your website is
Read the rest
using 4x more of their precious RAM on images that don't actually provide them with any visual benefit. Double-pixel displays are still, by a massive margin, the exception. Unless you're specifically serving a Retina Macbook-targeted audience, you're going to incur a lot of overhead for no appreciable benefit for the majority of your audience.
In Don’t use JavaScript for Retinafying
James Duncan Davidson - noted photographer and software developer - has played with image delivery for Retina quite a bit. He details much of it on his blog: http://duncandavidson.com/blog/2012/08/retina_ready Essentially he currently uses Picturefill (https://github.com/scottjehl/picturefill). From Davidsons' blog: "It’s a compact bit of JavaScript which supports a syntax that mimics the Picture Element Proposal. In a nutshell, it uses CSS media queries to sort out the most appropriate image to use out of a set." Looks promising.
In "Proper" Image Delivery on the Web

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.