[wp-trac] [WordPress Trac] #49412: Store filesize media metadata

WordPress Trac noreply at wordpress.org
Tue May 11 15:33:12 UTC 2021


#49412: Store filesize media metadata
--------------------------------------+-----------------------------
 Reporter:  Cybr                      |       Owner:  johnwatkins0
     Type:  feature request           |      Status:  assigned
 Priority:  normal                    |   Milestone:  Future Release
Component:  Media                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+-----------------------------

Comment (by joemcgill):

 Good seeing this effort move forward. For context, this idea has come up
 before as part of #36477 and also as a part of @azaozz's general
 optimization efforts
 ([https://wordpress.slack.com/archives/C02SX62S6/p1471633771000177 see
 Slack conversation]).

 One of the questions that has come up in the past (which I can't find
 record of, for some reason) is how to sites that rely on plugins or
 services that optimize images
 in the background after they're uploaded so that WordPress isn't relying
 on inaccurate filesize data saved in metadata.

 Reviewing progress here, I like the idea of a `wp_fileszie()` wrapper and
 agree with @desrosj that adding caching to this function could help reduce
 the load on direct reads of the filesystem. For the benefit of sites that
 don't have a persistent object cache in place, I wonder if using
 transients for this would be useful and if doing so would reduce the need
 for explicit attachment metadata since `wp_filesize()` could check for a
 cached value before executing a filesize read?

 Related: https://core.trac.wordpress.org/ticket/36477

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49412#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list