Page MenuHomePhabricator

Automatically inline small images using data URIs
ClosedPublic

Authored by epriestley on Feb 14 2014, 1:27 AM.
Tags
None
Referenced Files
F14021432: D8225.diff
Wed, Nov 6, 8:52 AM
F14008416: D8225.id.diff
Tue, Oct 29, 8:55 PM
F14008229: D8225.id19572.diff
Tue, Oct 29, 6:08 PM
F14007586: D8225.diff
Tue, Oct 29, 8:28 AM
F13995037: D8225.id19568.diff
Wed, Oct 23, 10:14 AM
F13990817: D8225.id19569.diff
Tue, Oct 22, 6:26 AM
F13969927: D8225.id19571.diff
Thu, Oct 17, 4:42 AM
Unknown Object (File)
Oct 7 2024, 10:03 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.