[wp-trac] [WordPress Trac] #21668: WordPress still does not save jpeg as progressive jpeg
WordPress Trac
wp-trac at lists.automattic.com
Thu Aug 23 16:44:06 UTC 2012
#21668: WordPress still does not save jpeg as progressive jpeg
-------------------------+-----------------------------
Reporter: _ck_ | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.4.1
Severity: normal | Keywords:
-------------------------+-----------------------------
Every time WordPress does `imagejpeg` it should be doing `imageinterlace`
beforehand to set progressive mode, but it's not.
http://php.net/manual/en/function.imageinterlace.php
Progressive jpeg has been supported by ALL browsers since 2001 or so.
progressive demo: http://bbshowcase.org/progressive/
Note that even if an ancient browser is listed somewhere as not rendering
progressive, progressive jpeg still will be displayed, simply showing it
all at once rather than gradual.
IE6 for example WILL load progressive jpeg, it will just not render it
progressively, instead it will load the entire image and then render all
at once at the end.
Progressive algorithm will also make slightly smaller jpeg as a side
effect in most cases.
ie. in `media.php`
`
imageinterlace($newimage,1);
imagejpeg( $newimage, ...
`
This update is years overdue.
It might be possible to futureproof this by adding a filter to `$newimage`
before the final `imagejpeg`. I am uncertain if that would work since
filters would not pass `$newimage` by reference and instead make a copy -
while newimage is only a pointer to php/gd memory. Can apply_filters be
forced to work somehow by reference instead of a copy? Maybe that should
be another feature idea.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21668>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list