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

WordPress Trac noreply at wordpress.org
Fri Nov 18 18:46:45 UTC 2016


#13372: Separate Image sizes for different post types
-------------------------------------------------+-------------------------
 Reporter:  brandondove                          |       Owner:
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:
Component:  Media                                |     Version:  4.6.1
 Severity:  normal                               |  Resolution:
 Keywords:  needs-patch dev-feedback close 2nd-  |     Focuses:
  opinion                                        |
-------------------------------------------------+-------------------------
Changes (by michael.ecklund):

 * keywords:  needs-patch dev-feedback close => needs-patch dev-feedback
     close 2nd-opinion
 * status:  closed => reopened
 * version:   => 4.6.1
 * resolution:  maybelater =>


Comment:

 There's also been discussion about this on [WordPress Stack Exchange
 chat](http://chat.stackexchange.com/transcript/message/33588572#33588572)
 with some good back and fourth arguing both sides.


 Just to highlight some key points here....

 ----


 '''This opens up several problems:'''
 - If I put the image inside one of my blogposts, it triggers an image
 resizing operation
 - If I remove the image from my page it doesn't remove the now redundant
 landscape files
 - If I upload an image in the media library without attaching it, none of
 these or all of these sizes are created
 - This functionality instantly breaks on any plugin that uses the
 media_handle_sideload type functions
 - Importing and exporting would need special cases to make sure that the
 images referenced also include references to the original image, with the
 content updates necessary to make sure they still work on the final
 install
 - This doesn't account for term featured images and non-post uses and a
 great number of other problems, there's a separation of concerns for a
 reason not to mention that if the on demand generation fails, you can
 trigger it repeatedly to start a DOS attack


 ----


 Adding more rules might let you optimize disk space and be more precise
 about certain things, such as where images can be used and what sizes
 they're created in. but that adds constraints, which while helpful for
 some, are obstacles for others.


 If you just specify in the FIRST PLACE that hey. These image sizes are
 only available in the scope of this post type. That's the intended
 functionality. Those are the rules. If you don't like it, then define your
 own rules as deemed necessary.


 ----


 Image is uploaded. Multiple image sizes are created based on this uploaded
 image.

 '''Consider this:'''

 - Who is specifying the need for this image size?
 - What is this image size going to be used for?
 - When will this image size be used?
 - Why will this image size be useful?
 - Where will this image size be used?

 '''Example answer set by a WordPress Developer:'''

 - Who is specifying the need for this image size?
 The person who wrote the code adding it
 - What is this image size going to be used for?
 Core doesn't know that, and it's not such a simple question to answer, but
 the person who added the image size knows
 - When will this image size be used?
 The developer might have a use case idea, but nobody can be certain,
 afterall I might add an image size for a particular use, only to find my
 users really like the way it looks right aligned in a post
 - Why will this image size be useful?
 The developer adding that has to make that call, and we can't know every
 answer, but there's also the users editorial decision when presented with
 that option
 - Where will this image size be used?
 That's highly dependent on who added the image and what they wanted to use
 it for. It might be that the theme wants an image size to match a header
 for the post, but that image size might be used elsewhere. Constraining
 that would cause problems for existing users and sites


 ----

 '''Who/what provides the information available? The theme or the
 plugin?'''


 The plugin author says, "hey theme. Here's what I have for you."

 The them author responds by saying, "Hey plugin, You don't have what I'm
 looking for, can you get me this as well please? "

 \*\* ADDS NEW IMAGE SIZE \*\*

 ----

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


More information about the wp-trac mailing list