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

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 9 06:46:14 UTC 2010


#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       |    Keywords:  dev-feedback  
-------------------------+--------------------------------------------------

Comment(by Viper007Bond):

 I think nacin is assuming that the width/height parameters can come from
 the URL rather than being hard coded into your PHP. If that was the case,
 you could just play with the GET values to make your code generate tons
 and tons of random sized images.

 Anyway, the media API already supports both named and array width/height
 based parameters, so there's no good reason to deviate from the existing
 code and reinvent the wheel.

 Infact your code would very, very easily be implemented as a plugin
 without a single theme change to call your function. On WordPress.com for
 example, we generate no thumbnails on upload and instead generate them on
 the fly as needed (although we use query strings to do so) and that's all
 done using hooks. You could do the same.

 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.

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


More information about the wp-trac mailing list