[wp-trac] [WordPress Trac] #61066: Add "cover" cropping mode for custom image sizes
WordPress Trac
noreply at wordpress.org
Wed May 1 19:43:27 UTC 2024
#61066: Add "cover" cropping mode for custom image sizes
-------------------------+-----------------------
Reporter: jefferyto | Owner: (none)
Type: enhancement | Status: reopened
Priority: normal | Milestone:
Component: Media | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+-----------------------
Changes (by jefferyto):
* status: closed => reopened
* resolution: invalid =>
Comment:
I am aware of hard cropping mode and it is not what I am asking for.
With hard cropping mode, the original image is cropped without any
resizing first. The cropped image is the exact right size but it cuts out
detail from the original image.
If you are familiar with CSS, the easiest analogy is:
* Soft cropping mode is like `background-size: contain`
* Hard cropping mode is like `background-size: 100%`
* "Cover" cropping mode (what I am asking for here) is like `background-
size: cover` (just the resizing behaviour, I am not asking for any
cropping)
I think the key points I am asking for are:
* Resizing the image (and no cropping) so the overall integrity of the
image is retained
* Being able to specify a minimum image size (width/height), so that the
resized image can be used without any upscaling by the browser
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61066#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list