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

WordPress Trac noreply at wordpress.org
Thu Apr 12 04:35:22 UTC 2018


#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:  needs-patch dev-feedback close 2nd-  |     Focuses:
  opinion                                        |
-------------------------------------------------+-------------------------

Comment (by galbaras):

 It may be better to not use post types, but allow plugin and theme
 developers to manage things via hooks and extra parameters, with old-style
 calls defaulting to "everything/everywhere".

 Images can have a new classification, which allows more than one
 selection. When uploaded, they can be designated "post image", "product
 image", etc.

 add_image_size() can be extended to accept an array of pre_registered
 designations, via a new function, say add_image_designation(), which
 accepts a name and a title.

 After an image is uploaded and classified, WordPress can generate the
 supposedly-correct thumbnails.

 Similarly, after editing the classification of an image, WordPress can
 adjust the thumbnails, possibly without ever deleting files.

 srcset handling can follow image classification.

 It is the responsibility of the developer and the content creator to use
 the correct images, but WordPress can help by allowing image selection by
 designation when embedding with Add Media.

 This can be made easier by linking content types with image designations,
 and then allowing only images matching the content type to be embedded.

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


More information about the wp-trac mailing list