Opened 10 years ago
Closed 8 years ago
#28325 closed feature request (duplicate)
Set featured image size and differ per post type
Reported by: | Bike | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9 |
Component: | Media | Keywords: | needs-patch |
Focuses: | ui, template, performance | Cc: |
Description
Hi, would it be possible to expand this function:
http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
so a post type can be added as a parameter? That way we can add custom functions that would allow different featured images sizes to be set for posts vs pages vs CPT's etc., as often these have different layouts and size requirements. Currently all featured images are the same size, usually over/undersized (and rescaled in CSS), which is a waste of bandwidth and often degrades the images.
Connected with this: it should be possible to choose not only the image, but also the image size when setting a featured image. I can specify my media settings to include, say, a 700px as Medum size, so it will be perfect for my theme as featured image, but there is no option to select this, always the largest (original) version is set.
This can be changed with the above function, (but only global, not per post type), but it would be better if a size simply could be chosen (original, large, medium etc).
Thanks for considering.
Related: #13372