Make WordPress Core

Opened 7 years ago

Closed 3 years ago

#38780 closed enhancement (wontfix)

Thumbnail images should be cropped from the centre top

Reported by: johnbillion's profile johnbillion Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch
Focuses: Cc:


Given a tall image of portrait orientation, the default behaviour of WordPress is to crop the image to the centre middle when creating the thumbnail image.

This means that for images such as portrait photographs or infographics, the thumbnail is far from optimal. The centre top of such images would be a better crop.

I think it makes sense to switch the default thumbnail image size cropping to centre top instead of centre middle.

Attachments (1)

38780.patch (426 bytes) - added by dhanendran 7 years ago.

Download all attachments as: .zip

Change History (9)

#1 @lukecavanagh
7 years ago


So based on image orientation, then set the default hard crop?

Smart cropping still seems like a feature which would be of use being in core.

#2 @johnbillion
7 years ago

The orientation doesn't actually matter to the cropping position, because centre top is the same as centre middle when cropping a landscape orientation (or square) image.

7 years ago

#3 @dhanendran
7 years ago

@johnbillion added the path for this issue with this ticket.

Modified the default positions in the array as 'top', as we are having the values set for the 'top' below. This will not affect the landscape images as we are cropping it from top. Tested this with multiple images and works good for me.

Please check and let me know if it is fine.


#4 @joemcgill
7 years ago

  • Keywords 2nd-opinion removed

I like the intent of this, but worry about the implications. This would need a lot of testing to better understand use cases where this change would result in a worse experience than the current defaults. I should also note that it's already possible for someone to modify their own thumbnail cropping option by adding a filter to option_thumbnail_crop or updating the thumbnail_crop option directly.

#5 @dhanendran
7 years ago

Yes @joemcgill agreed, User has option to modify the defaults. But the question is, is current defaults working correctly? When I upload a portrait image the defaults crops from center which may affect the image context.

I agree that, it needs lot of testing to understand and verify the fix.

#6 @markhowellsmead
7 years ago

It's difficult to say how many vertical-format images are portraits and therefore whether this change would be an improvement. A non-scientific analysis of the first few hundred Google search results for portrait images show that the face in many portraits is in the centre or along the upper median third line of the image. So if they're cropped to a square or horizontal format, the crop would chop off the bottom half of the face. My opinion is that if there's an option for the default action to be changed programmatically on a per-case basis, that should be sufficient.

#7 @dhanendran
7 years ago

  • Keywords has-patch added; needs-patch good-first-bug removed

#8 @johnbillion
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Closing this off due to lack of interest in four years. I like the idea of making this switch, but I have no data to back up my suspicion that this would provide an improved crop more often than not, plus new features such as inline image cropping in the block editor means this is less of an issue than it was.

Note: See TracTickets for help on using tickets.