[wp-trac] [WordPress Trac] #13372: Separate Image sizes for different post types

WordPress Trac noreply at wordpress.org
Sat Apr 18 04:45:23 UTC 2020


#13372: Separate Image sizes for different post types
--------------------------------------------+------------------------------
 Reporter:  brandondove                     |       Owner:  (none)
     Type:  enhancement                     |      Status:  reopened
 Priority:  normal                          |   Milestone:  Awaiting Review
Component:  Media                           |     Version:  4.6.1
 Severity:  normal                          |  Resolution:
 Keywords:  dev-feedback close 2nd-opinion  |     Focuses:
--------------------------------------------+------------------------------

Comment (by galbaras):

 This is a very clever, although the specific code provided isn't flexible
 enough to accommodate everything.

 Still, we can use this idea as a way to implement the concept of
 registered image designations and size-to-designation mapping. Once these
 things are registered, the filter just needs to look up the designations
 for each size and compare with `$request['post_type']`,
 `$request['taxonomy']`, etc.

 Alternatively, it may be possible to extend the `intermediate_image_sizes`
 filter to accept an array of designations (must be passed through a
 cascade of functions), or at least the context (e.g. 'post' or
 'category').

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


More information about the wp-trac mailing list