[wp-trac] [WordPress Trac] #21038: Provide an option for creating 2x images of user content (for Retina Displays)

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 6 16:39:10 UTC 2012


#21038: Provide an option for creating 2x images of user content (for Retina
Displays)
-----------------------------+-----------------------------
 Reporter:  twam             |       Owner:  Otto42
     Type:  feature request  |      Status:  assigned
 Priority:  normal           |   Milestone:  Future Release
Component:  Media            |     Version:  3.4
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |
-----------------------------+-----------------------------

Comment (by Otto42):

 @travisnorthcutt:

 I'd prefer to avoid creating an extra 2x image for every image size,
 doubling the number of images created on upload, yes.

 The JS replacement technique is one I plan on using, however retina.js and
 similar varients are simple-stupid solutions that cause extra server load.
 Basically it hits the server to ask if an "@2x" image exists for every
 image on the page, and does replacement then. With the proposed method, we
 can create the 2x images only needed (reducing number of images) and cause
 JS replacement to occur only on the images where 2x images exist
 (eliminating the extra server hit overhead).

 Essentially, we can be smart about it instead of using brute-force "dumb"
 solutions. So why not make it more intelligent overall?

 With any luck, browsers will implement the srcset attribute on images (or
 something similar) and eliminate the need for JS hackjobs like this
 anyway.

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


More information about the wp-trac mailing list