[wp-trac] [WordPress Trac] #21810: Improve intermediate image size handling
WordPress Trac
noreply at wordpress.org
Mon Jul 7 22:54:46 UTC 2014
#21810: Improve intermediate image size handling
-------------------------+-----------------------------
Reporter: koopersmith | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Media | Version: 3.5
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+-----------------------------
Comment (by MikeSchinkel):
Repeating what I wrote [http://make.wordpress.org/ui/2014/07/07/feature-
plugin-improving-image-editing/#comment-24416 here]:
1. Core needs to add a concept of ''“Image Type”'' that can be added using
PHP code, i.e. maybe something like:
{{{
add_image_type( $type, array(
'label' => $label,
'sizes' = array(
'small' => '75x75',
'medium' => '200x150',
'large' => '500x300',
'xlarge' => '1024x768'
)
));
}}}
This would allow core to generate only the sizes needed for those types,
allow for easier filtering of images (by type) and empower plugin and core
developers to enhance UX for functionality related to images. Examples of
types might be `'headshot'`, `'hero'`, `'featured'` and so on.
2. Once we have image types and sizes, filenames could be augmented with
that information, i.e. instead of `jsmith-500x300.jpg` it could be renamed
to `jsmith-large-headshot.jpg`.
3. And if core does not do 2., at least it could remove the sizes from the
filenames when it resizes a file so that you don’t get this kind of name
`jsmith-500x300-75x75.jpg` but instead just `jsmith-75x75.jpg`.
4. Note the sizes I included above are not the same aspect ratios so it
would be nice of by setting those sizes for a type that WordPress core
would present a UI to the user to crop those sizes separately.
5. It would really be nice if core could add an option to generate image
files on demand the first time an image is externally accessed rather than
on upload so that you don’t end up for an order of magnitude more image
files on disk then are actually ever used.
Wasn't sure if I should post this as a separate ticket or not...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21810#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list