[wp-trac] [WordPress Trac] #21819: Use an image size for custom headers instead of duplicating an attachment

WordPress Trac noreply at wordpress.org
Thu Mar 23 12:56:28 UTC 2017


#21819: Use an image size for custom headers instead of duplicating an attachment
-------------------------+-----------------------
 Reporter:  koopersmith  |       Owner:
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  4.7.4
Component:  Customize    |     Version:  3.5
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+-----------------------

Comment (by joemcgill):

 Replying to [comment:17 westonruter]:

 > So essentially this would be introducing the concept of derived images.

 In short, adding support for derived images is exactly how I would think
 about this feature. The main decision I see is determining how we would
 store/retrieve data about a derived image and how those derived images
 relate to the original attachment they were derived from.

 Something like `alternate_sizes` or `variations` on the attachment
 metadata could be simpler, but I do think there are times where we would
 want a variation of an image to be treated like a separate image entirely.
 For example, if we used this same structure to store a variation on an
 image that was treated by a filter, we might want both the filtered and
 unfiltered variation visible in the media library.

 Also, regardless of the storage mechanism for each named variation, we
 should create sets of sizes like `custom_logo` containing its own `small`,
 `medium`, `large`, etc. sizes. That way we can add responsive image
 support. For that, I'm not sure if we should just use the default
 registered intermediate sizes for the site, or if alternate sizes for a
 custom logo variation should be registered when someone adds support for
 custom logos—as an additional setting.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21819#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list