WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 2 months ago

Last modified 7 weeks ago

#48332 closed enhancement (fixed)

Image crop settings

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

Description

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 (3)

#1 @joemcgill
2 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
2 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
7 weeks ago

  • Milestone Awaiting Review deleted
  • Version 5.2.3 deleted
Note: See TracTickets for help on using tickets.