WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 22 months ago

#22100 new enhancement

Get rid of $_wp_additional_image_sizes — at Version 5

Reported by: scribu Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch needs-refresh
Focuses: Cc:

Description (last modified by scribu)

Goals:

  1. Have a solid API for working with intermediate image size definitions.
  1. Don't hardcode default image sizes; register them like any other.
  1. Introduce a 'pregenerate' arg, which will allow defining an image size that will not be automatically generated right after upload.

Related tickets: #15311, #21810

Change History (7)

@scribu3 years ago

comment:1 @scribu3 years ago

  • Keywords has-patch added

22100.diff is a first stab at register_image_size(), image_size_exists() etc.

TODO: generate the post-thumbnail size during set_post_thumbnail(), to avoid CPU spikes:

http://core.trac.wordpress.org/ticket/21961#comment:3

comment:2 @scribu3 years ago

  • Summary changed from Introduce register_image_size() to Get rid of $_wp_additional_image_sizes

comment:3 @ocean903 years ago

  • Cc ocean90 added

@scribu3 years ago

comment:4 @scribu3 years ago

22100.2.diff makes add_image_size() accept an array of arguments, to avoid the hassle of deprecating it.

comment:5 @scribu3 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.