[wp-trac] [WordPress Trac] #47873: Introduce handling of "Big Images"
WordPress Trac
noreply at wordpress.org
Wed Aug 14 01:07:43 UTC 2019
#47873: Introduce handling of "Big Images"
-------------------------+---------------------
Reporter: azaozz | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.3
Component: Media | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+---------------------
Comment (by azaozz):
Related #47872, #14459, #14459, #32437.
As far as I see the simplest, backwards-compatible and sufficiently
future-proof solution is to:
1. Detect when an image is "big". This should be by looking at both file
size and dimensions and would need some comparison data. For example a
3000 x 2250 JPEG image is "big" if the file size is over 1600KB, etc. This
test may also include looking at EXIF orientation data. An edited image
would always have that set to 1 (proper orientation).
2. When an image is big, create a "web optimized maximum size" of it. Then
use that max-size as the largest available size in WordPress. There is an
edge case when the original image dimensions match the max-size
dimensions. Then it should still create the max-size if the file size is
over the limit, and can compare the file sizes.
On the technical side that would need only a small change to how we store
image meta. When there is a big image, the "full" size would be the path
to the max-size created after uploading, and the original image path would
be in `original-image`. Alternatively we can add separate meta key for it.
Then these "original images" will be available for downloading from the
Media Library for users that use WP as online albums/image storage (in
case they want to print them, etc.). They also will be available for
making additional image sub-sizes in the future.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47873#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list