Page MenuHomePhabricator

CSSMin::encodeImageAsDataURI() should be smarter about SVG images (tracking)
Closed, DuplicatePublic

Description

Thanks to the work of GCI students, we now have lots of SVG images in core (and lots more in extensions). However, they're usually somewhat pretty-formatted, with whitespace and comments.

CSSMin::encodeImageAsDataURI() should be smart about this in two ways:

  • Not base64-encode plain ASCII text, just escape quotes and backslashes
  • Strip whitespace and comments (and possibly apply other transformations)

Version: unspecified
Severity: enhancement

Details

Reference
bz57777

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:32 AM
bzimport set Reference to bz57777.
bzimport added a subscriber: Unknown Object (MLST).
matmarex created this task.Nov 30 2013, 6:27 PM

Whitespace and comment stripping is unlikely to produce much gain. Stripping other unneeded stuff can produce big gains as we observed in ULS images.

(In reply to comment #1)

Whitespace and comment stripping is unlikely to produce much gain. Stripping
other unneeded stuff can produce big gains as we observed in ULS images.

I'm thinking of taking up this bug!!

Well what could be that other unneeded stuff that could be striped ??

Change 116490 had a related patch set uploaded by Deepali:
Handling svg images in CSSMin::encodeImageAsDataURI()

https://gerrit.wikimedia.org/r/116490

Splitting this into two things:

  • Optimizing SVGs (bug 34812)
  • Whether to use base 64 (bug 67341)

Change 116490 abandoned by Bartosz Dziewoński:
Handling svg images in CSSMin::encodeImageAsDataURI()

Reason:
No interest from uploader. Superseded by https://gerrit.wikimedia.org/r/161091

https://gerrit.wikimedia.org/r/116490

Krinkle changed the task status from Open to Stalled.Apr 28 2015, 5:40 PM
Krinkle lowered the priority of this task from High to Normal.
Krinkle moved this task from Inbox to Backlog on the MediaWiki-ResourceLoader board.
Krinkle set Security to None.
Krinkle removed a subscriber: Unknown Object (MLST).
ori added a comment.Sep 18 2015, 9:40 PM
In T59777#629806, @Mattflaschen wrote:

Splitting this into two things:

  • Optimizing SVGs (bug 34812)
  • Whether to use base 64 (bug 67341)

The latter was resolved by @matmarex, so this is now a dupe of T36812.

Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptSep 18 2015, 9:41 PM