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

WordPress Trac noreply at wordpress.org
Tue May 11 14:17:40 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 desrosj):

 Would it be beneficial to add caching for `wp_filesize()`? I don't think
 the metadata will be backfilled to attachments unless
 `wp_generate_attachment_metadata()` is called for that file, or they are
 run through thumbnail regeneration. having
 `wp_cache_get()`/`wp_cache_add()` could prevent the need for `filesize()`
 calls there.

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


More information about the wp-trac mailing list