[wp-trac] [WordPress Trac] #25884: Create media sizes when selected, not on initial upload

WordPress Trac noreply at wordpress.org
Fri Nov 8 19:28:55 UTC 2013


#25884: Create media sizes when selected, not on initial upload
-------------------------+-----------------------------
 Reporter:  drrobotnik   |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Media        |    Version:  3.7.1
 Severity:  normal       |   Keywords:  dev-feedback
-------------------------+-----------------------------
 Currently it's possible for plugins and themes to add_image_size for their
 unique uses. The unintended consequence is that these crops are applied to
 every image uploaded which causes an exponential amount of never used or
 seen media, thus very bloated upload folder.

 There are few good alternatives to WP add_image_size. one method with the
 new WP 3.5 image editor, is to create the image crop when the image crop
 is requested. This works for custom sizes within template/plugin code.
 [https://gist.github.com/drrobotnik/7375268 Here's the method I've been
 using].

 The core change would be to adjust add_image_size to not create the image
 crops on user upload, but instead when the image is requested and actually
 used via the wp_get_attachment related functions. I believe implementing
 this way won't cause upgrading sites to break.

 Looking forward to feedback on this.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25884>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list