Make WordPress Core

Opened 3 years ago

Closed 16 months ago

#21294 closed enhancement (duplicate)

Upsize an image for crops larger than itself

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


Please could the wordpress image handling introduce support for a zoom crop of images smaller than specified file sizes.

Change History (12)

comment:1 @TwoThirdsWater3 years ago

  • Component changed from General to Media

comment:2 @cramdesign3 years ago

  • Cc matt@… added

comment:3 @markoheijnen2 years ago

  • Keywords close reporter-feedback added

What is the question here? What kind of changed do you need?

comment:4 follow-up: @TwoThirdsWater2 years ago

If you upload a small image, then request a larger file format (as specified using add_image_size) Wordpress will return a larger image, but not cropped to the ratio specified in add_image_size. As I understand it wordpress does not currently support 'zoom and crop'. This would be a useful function as the current set up can break layouts by returning incorrectly shaped images.

comment:5 @markoheijnen2 years ago

  • Keywords close reporter-feedback removed

Ah that way. WordPress doesn't do upscaling. In this case I'm not sure what the right solution would be.

#23713 is related

comment:6 @TwoThirdsWater2 years ago

At the risk of stating the obvious, a solution would be to enable Wordpress to upscale, or at least add it as a configurable option. Whilst I understand all the arguments about loss of quality, this would be a valuable addition to the image handling set up (and not a hard one to achieve).

comment:8 @TwoThirdsWater2 years ago

Good to know. Many thanks!

comment:10 @SergeyBiryukov18 months ago

Related: #26381, #27910.

Last edited 18 months ago by SergeyBiryukov (previous) (diff)

comment:11 in reply to: ↑ 4 @ericlewis17 months ago

  • Summary changed from Introduce zoom-crop in Media image handling to Upsize an image for crops larger than itself

I support the idea of upscaling images so that an attachment never has a "non-existing" image size. This can break functionality in unexpected ways, and your typical user will not understand why a header image doesn't show up even though they uploaded one in their theme options page.

Last edited 17 months ago by ericlewis (previous) (diff)

comment:12 @wonderboymusic16 months ago

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

Duplicate of #19872.

Note: See TracTickets for help on using tickets.