[wp-trac] [WordPress Trac] #37840: Optimize full size images
WordPress Trac
noreply at wordpress.org
Tue Mar 28 23:35:52 UTC 2017
#37840: Optimize full size images
-------------------------+------------------
Reporter: joemcgill | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.8
Component: Media | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------+------------------
Comment (by enshrined):
I agree with @joemcgill here, I think it makes sense to have an extra
image size for an optimised 'full' image but only store it if the
difference in filesize actually makes it worth it. Perhaps set the
difference as a sensible default but make it filterable?
The new image size would then need to act as an alias for 'full' if it
hasn't been generated either due to it not existing yet or because the
difference in file size is negligible.
I'm not so sure about adding extra image sizes though, these can be added
by themes/plugins and the filters in `wp_calculate_image_srcset()` should
allow you to add these sizes to the srcset without too much trouble. I
don't see the need to bloat WordPress's uploads dir too much more when a
lot of themes will define these sizes themselves if they need them.
I'd be quite happy to have a crack at a first draft of a patch if the
above sounds like the right sort of approach?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37840#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list