Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#39471 closed enhancement (duplicate)

wordpress-logo.svg can be optimized

Reported by: lukecavanagh's profile lukecavanagh Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: performance Cc:

Description

The WordPress logo SVG which is loaded on the wp-login.php screen can be optimized from 1.5kb down to 1.1kb.

https://github.com/WordPress/WordPress/blob/master/wp-admin/images/wordpress-logo.svg

Attachments (3)

wordpress-logo.svg (1.1 KB) - added by lukecavanagh 8 years ago.
wordpress-logo.svg optimized version
wordpress-logo.png (2.4 KB) - added by lukecavanagh 8 years ago.
wordpress-logo.png optimized version
wp-admin-images-optimized.zip (171.2 KB) - added by lukecavanagh 8 years ago.
wp-admin optimized images remaining

Download all attachments as: .zip

Change History (8)

@lukecavanagh
8 years ago

wordpress-logo.svg optimized version

@lukecavanagh
8 years ago

wordpress-logo.png optimized version

#1 @dd32
8 years ago

  • Keywords has-patch added

Can you let us know what application you've used for the optimization and the settings used?

#2 @netweb
8 years ago

Related, possible duplicate: #30587 ?

I've just refreshed the patch in #30587 to account for the WordPress SVG logos in /wp-admin/images. The patch uses our existing build tools, specifically the imagemin task via grunt imagemin:core to compress SVGs:

After running grunt imagemin:core there are (currently) 5 SVGs with optimizations available to commit:

$ svn st
M       src/wp-admin/images/wordpress-logo-white.svg
M       src/wp-admin/images/wordpress-logo.svg
M       src/wp-content/themes/twentyfourteen/images/pattern-dark.svg
M       src/wp-content/themes/twentyfourteen/images/pattern-light.svg
M       src/wp-content/themes/twentyseventeen/assets/images/svg-icons.svg

#3 @lukecavanagh
8 years ago

@dd32 

So the SVG was optimized using http://petercollingridge.appspot.com/svg-optimiser

The PNG was optimized using https://tinypng.com/

Also the remaining images in the wp-admin folder can be optimized down to reduce the total size by 83kb.

That was done just using https://www.imagerecycle.com/uploader

TinyPNG would not process the Gif images.

@lukecavanagh
8 years ago

wp-admin optimized images remaining

#4 @pento
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version 4.7 deleted

The svg-optimiser tool compresses slightly better than imagemin, (1.1KB vs 1.3KB on wordpress-logo.svg) but it does so by rounding co-ordinates and path lengths. I really don't like changing the actual image data, and imagemin can be configured to do that if we really wanted to explore that option.

Tinypng saved 60 bytes over imagemin on wordpress-logo.png, which totally isn't worth it.

I'm cool with investigating tweaking the imagemin options, but switching to external, manually run tools is not my idea of a fun time.

The best option is to fix #30587, and then see if there are any imagemin options we can tweak that don't cause image quality loss.

#5 @lukecavanagh
8 years ago

@pento

Either of those external tools do have an API, which could be used.

Note: See TracTickets for help on using tickets.