[wp-trac] [WordPress Trac] #49412: Store filesize media metadata
WordPress Trac
noreply at wordpress.org
Tue Feb 18 00:11:31 UTC 2020
#49412: Store filesize media metadata
-----------------------------+-----------------------------
Reporter: Cybr | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Future Release
Component: Media | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: performance
-----------------------------+-----------------------------
Comment (by johnwatkins0):
I've been working on this. I agree it's a useful idea. I've seen and
created plenty of workarounds for the fact that filesize data isn't
already saved with images. It's especially tricky where files are stored
remotely.
The only question I have is whether we think it would useful to have the
file size for all intermediate image sizes as well as the full-sized
image, or just for the full-sized image?
I think it makes size to store all of them, since the most of the main
reasons for having this data involve comparing filesizes -- e.g., when
looping through images to find the largest one under a limit.
The drawbacks to storing all are (1) more filesize calls at the time an
image is uploaded, and (2) inflated metadata.
I'm going ahead with the assumption that we want all sizes.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49412#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list