Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 7.4 KB

RICG-newsletter-2015-06-01.md

File metadata and controls

53 lines (34 loc) · 7.4 KB

Update! Your! Picturefills!

Teaser: Old Picturefills are holding the web back.

Update! Your! Picturefills!

I know I mentioned this last time, but recent events have made it super-extra important – if you use Picturefill and you haven’t updated to version 2.3.1, please, drop everything and upgrade right now.

Mat Marquis explains why this upgrade is so critical over at CSS Tricks. Basically: old Picturefills made some assumptions about browser support that were true at the time, but aren’t any longer. Those assumptions mean Picturefill <2.3.1 tries to polyfill (and write to) the new currentSrc attribute in some browsers that already support it — but when supported, currentSrc is read-only. Trying to write to a read-only when use strict is in play is bad news – giant sites like ESPN that use old Picturefills were missing most of their images in Microsoft Edge previews and WebKit nightlies. So, rather than break the web, Edge and WebKit have decided not to not support currentSrc until y’all upgrade your Picturefills.

Picturefill is supposed to be a bridge to the future, not an obstacle to it. So, again: please upgrade!

While you’re at it: upgrade your WordPress plugins, too!

The official RICG WordPress responsive images plugin was recently updated. The new version includes:

  • the aforementioned Picturefill 2.3.1, the importance of which should already be clear
  • bug fixes and performance improvements
  • Dave Newton’s image-y magick, behind a flag

The last item on that list is particularly exciting. Dave’s optimal ImageMagick settings (brought previously to Grunt and PHP) produce much smaller images. But they’re new, and they eat up a little more CPU than the WordPress defaults, so this is going to start out as an opt-in thing. If you’re using the plugin and care about image performance enough to subscribe to a newsletter about it, I urge you: opt in and provide feedback.

Super Dave

In addition to bringing huge performance gains to the WordPress plugin’s 5,000+ active installs, Dave also recently became so frustrated with the horrendous performance of animated gifs that he became a core Firefox committer and registered a new IANA MIME type in order to be able to this:

<picture>
	<source type="video/vnd.mozilla.apng" srcset="cat.apng" />
	<img src="cat.gif" alt="One cool cat" />
</picture>

We’ll owe every APNG we ever use with a gif fallback to Dave. Ideas are easy, but wrangling all of the code and politics surrounding browser implementations and standards bodies necessary to implement them is very, very hard. Thanks, Dave. And, Yoav: I guess you’ve been replaced? (;

Grab bag

See you in a couple of weeks!

—eric