WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 16 months ago

#16657 closed enhancement (worksforme)

Introduce a new "smart" crop mode for images

Reported by: mudslidedesign Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Media Keywords:
Focuses: Cc:

Description

There are scenarios when neither the soft-crop nor hard-crop modes are suitable when resizing and cropping images.

We'd like to see a third crop mode introduced which selectively crops an image only if the aspect ratio of the full-size image is close to the aspect ratio of the desired image dimensions.

This is particularly useful when resizing images for display in a slide-show where you want to avoid seeing thin gaps either side of the image caused by a slight difference in the aspect ratios. This can be avoided with cropping, but in this scenario you typically want to avoid excessive cropping from occurring.

A patch file and a document explaining the feature in greater depth (showing examples) will follow shortly.

Change History (4)

comment:1 follow-up: mudslidedesign3 years ago

  • Summary changed from Introduce a new "smart" crop mode to Introduce a new "smart" crop mode for images
  • Version set to 3.1

comment:2 in reply to: ↑ 1 F J Kaiser2 years ago

  • Cc 24-7@… added
  • Keywords needs-testing removed

Replying to mudslidedesign: "A patch file and a document explaining the feature in greater depth (showing examples) will follow shortly.

No progress after 8 month.

I'd suggest to close this as you can still set overflow: hidden; and offset-y: Npx; which works in most cases.

comment:3 MikeHansenMe16 months ago

  • Keywords close added

comment:4 markoheijnen16 months ago

  • Keywords dev-feedback close removed
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Closing as it is. If you want to have a better crop you now can create your own WP_Image_Editor implementation and use that.

Note: See TracTickets for help on using tickets.