[wp-trac] [WordPress Trac] #43524: Add another default image size

WordPress Trac noreply at wordpress.org
Fri Sep 6 21:02:09 UTC 2019


#43524: Add another default image size
--------------------------------------+------------------------
 Reporter:  azaozz                    |       Owner:  joemcgill
     Type:  enhancement               |      Status:  assigned
 Priority:  normal                    |   Milestone:  5.3
Component:  Media                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch needs-dev-note  |     Focuses:
--------------------------------------+------------------------

Comment (by azaozz):

 Replying to [comment:39 johnbillion]:
 > What's the reason for using the dimensions in the image size name?

 There was a discussion about sub-sizes "names" in #core-media on Slack.
 The old practice of "relative" names made sense at the time (early 2000's)
 for "non-responsive" images. The names also can be quite confusing. A user
 (or a plugin) may set "thumbnail" to be 500x500px and "large" to be
 200x300px.

 "Modern" images have srcset and sizes attributes, the old relative sizes
 don't represent how the images "work" any more. They are great for use in
 the UI, but don't correspond to using a particular image file. In
 addition, to be able to generate good srcset, WP depends on having several
 suitable sub-sizes. In that terms changing the default sub-sizes should be
 discouraged. This is also the reason the new sizes are added at runtime
 and not stored in the DB.

 There was also a discussion about having something like
 `register_image_size()` and `WP_Image` object at some point in the future.
 Also removing the size options from Settings->Media, and adding "Add
 Custom Size" instead.

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


More information about the wp-trac mailing list