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

WordPress Trac wp-trac at lists.automattic.com
Thu Jul 19 08:07:29 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 mdgl):

 If this feature is being considered for 3.5, may I suggest we also
 consider proper support for uploaded SVG images at the same time?  I think
 this may even help us achieve the most appropriate design for the proposed
 "dynamic image resizing" feature.

 Presently, you can easily upload SVG files (by modifying the allowable
 MIME types through a plug-in) but they are not treated as "images", merely
 as opaque attachments.  You can (perhaps) also embed SVG files in (X)HTML
 where they are effectively invisible to WP and not reusable.

 I believe you should be able to upload SVG image files (with a default
 size), have them displayed and treated as images by WP and subsequently
 reuse them in different places and at different sizes through the HTML
 <img> tag.

 The key to this I think is separating the "size" attributes from the
 stored image file and its use(s) in posts/pages. That is, when you upload
 an image file it is stored in the library with a default size (actual
 image size in the case of bitmaps, declared size in the case of SVG).
 When you make use of an image (e.g. by attaching it to a post) you should
 be able to declare the actual size to be used for the image in that
 particular instance. In these cases, WP can choose and/or dynamically
 generate an appropriate bitmap or simply let the browser scale the SVG
 automatically to the dimensions specified on the <img> tag.

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


More information about the wp-trac mailing list