[wp-trac] [WordPress Trac] #24380: Missing Compression Parameter in WP_Image_Editor_GD
WordPress Trac
noreply at wordpress.org
Mon Apr 25 16:41:39 UTC 2016
#24380: Missing Compression Parameter in WP_Image_Editor_GD
-------------------------------------------------+-------------------------
Reporter: MuViMoTV | Owner:
Type: enhancement | wonderboymusic
Priority: normal | Status: reopened
Component: Media | Milestone: Future
Severity: normal | Release
Keywords: has-patch dev-feedback needs- | Version: 3.5.1
refresh | Resolution:
| Focuses:
-------------------------------------------------+-------------------------
Comment (by mikemanger):
Given the 4.5 ImageMagick improvements, I decided to do some GD testing -
I averaged 100 runs for each compression level. It isn't particularly
scientific as I haven't removed outliers and, more importantly, haven't
profiled the memory usage.
Here are the results I got against a 143KB (146270 bytes) screenshot of
this page saved in MS paint:
||= Level =||= Time (seconds) =||= Size (bytes) =||
|| 0 || 0.0552 || 3722124 ||
|| 1 || 0.044 || 146909 ||
|| 2 || 0.0439 || 145171 ||
|| 3 || 0.044 || 143488 ||
|| 4 || 0.0589 || 128725 ||
|| 5 || 0.0603 || 127968 ||
|| '''6''' || '''0.0642''' || '''127312''' ||
|| 7 || 0.0666 || 126933 ||
|| 8 || 0.0959 || 125587 ||
|| 9 || 0.1903 || 125195 ||
'''Not passing a quality level gives the same result as 6''', which is the
default on most servers (it can be changed at PHP compile time or
php.ini).
I tried some larger images and got more or less the same results - the
difference between 8/9 can be much bigger but so can the process time
(sometimes 3 times longer).
I guess the decision is to either:
* leave it is as it is
* change the default to something else
* and/or allow for people to filter the value.
I'm honestly not sure it matters as even then Google PageSpeed will likely
still complain with most images as I was able to compress the same image
down to 90KB using optipng.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/24380#comment:48>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list