[wp-trac] [WordPress Trac] #15311: dynamic image resize (on the fly) using already available functions

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 17 17:02:43 UTC 2012


#15311: dynamic image resize (on the fly) using already available functions
--------------------------+-----------------------------
 Reporter:  vteixeira     |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Media         |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+-----------------------------

Comment (by scribu):

 Replying to [comment:23 Viper007Bond]:
 > I'd still like to get this into core though, but we need to make sure to
 avoid issues like the resize failing and then each request attempting to
 resize it again.

 Here's my take on the whole thing:

 1. Add an 'immediate' parameter to each intermediate size. `'immediate' =>
 true` means the file is generated right after the attachment is uploaded.

 2. For `'immediate' => false` sizes, generate it on the fly, only if it's
 not present in the array returned by wp_get_attachment_metadata().

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15311#comment:43>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list