Make WordPress Core

Opened 12 months ago

Closed 12 months ago

Last modified 6 weeks ago

#48332 closed enhancement (worksforme)

Image crop settings

Reported by: AllysonSouza Owned by:
Milestone: Priority: normal
Severity: trivial Version:
Component: Media Keywords:
Focuses: administration Cc:


I want to know why there's no option to select if medium and large image sizes should be cropped or not. Some themes use medium and large image sizes in a way they would fit better if cropped.

Change History (4)

#1 @joemcgill
12 months ago

  • Resolution set to fixed
  • Status changed from new to closed

Hi @AllysonSouza. Thanks for the question and welcome to Trac! Medium and large sizes are by definition meant to be uncropped resizes of the original. These sizes also get used to fill out the srcset attribute for responsive images. If a theme wants to display an image at a specific dimension it's best to use register specific sizes using add_image_size().

#2 @AllysonSouza
12 months ago

Hi @joemcgill, thanks for your reply. Sorry, but I still don't get why there's no crop checkbox for those sizes. I understand they're used for srcset, but I guess someone could want to serve a cropped medium or large size even in different resolutions. If I can set it to true by code, why not let it to be set from panel?

#3 @desrosj
12 months ago

  • Milestone Awaiting Review deleted
  • Version 5.2.3 deleted

#4 @SergeyBiryukov
6 weeks ago

  • Resolution changed from fixed to worksforme

Just changing the resolution to worksforme for accuracy, as it doesn't look like there was a commit here.

Feel free to reopen if still relevant.

Note: See TracTickets for help on using tickets.