Page MenuHomePhabricator

Automatically inline small images using data URIs
ClosedPublic

Authored by epriestley on Feb 14 2014, 1:27 AM.
Tags
None
Referenced Files
F14373176: D8225.id19569.diff
Fri, Dec 20, 8:31 PM
F14368324: D8225.diff
Fri, Dec 20, 4:12 PM
Unknown Object (File)
Thu, Dec 12, 4:10 PM
Unknown Object (File)
Thu, Dec 12, 10:19 AM
Unknown Object (File)
Wed, Dec 11, 6:12 PM
Unknown Object (File)
Sun, Dec 8, 3:38 PM
Unknown Object (File)
Sat, Dec 7, 7:58 PM
Unknown Object (File)
Thu, Dec 5, 8:00 AM
Subscribers

Details

Reviewers
btrahan
chad
Maniphest Tasks
Restricted Maniphest Task
Commits
Restricted Diffusion Commit
rP005d194cd28d: Automatically inline small images using data URIs
Summary

Fixes T3300. Images under 32KB are inlined automatically into CSS using data URIs; larger images remain as normal links. I picked the 32KB threshold arbitrarily, based on it looking roughly like it got reasonable results on core.pkg.css (inlining most of the random stuff, but not inlining all the 2X sprites and such).

Test Plan

Loaded site, browsed around, looked at generated CSS.

Diff Detail

Repository
rP Phabricator
Branch
datauri
Lint
Lint Passed
Unit
Tests Passed

Event Timeline

epriestley updated this revision to Unknown Object (????).Feb 14 2014, 1:27 AM
  • Minor fix.
epriestley updated this revision to Unknown Object (????).Feb 14 2014, 1:31 AM

Helpfully, I'd already done some research in T3300 and discovered a 32KB limit in IE8, so this limit is now "a hard limit imposed by IE8" instead of "an arbitrary limit I made up".

epriestley updated this revision to Unknown Object (????).Feb 14 2014, 1:32 AM

Slightly clearer comment.

OK, new timeline is pretty awesome.