Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#48332 closed enhancement (worksforme)

Image crop settings

Reported by: allysonsouza's profile 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
5 years 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
5 years 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
5 years ago

  • Milestone Awaiting Review deleted
  • Version 5.2.3 deleted

#4 @SergeyBiryukov
4 years 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.