WordPress.org

Make WordPress Core

Opened 19 months ago

Last modified 9 days ago

#36441 new defect (bug)

Customizer: when setting header image, site icon and logo, do not force the user to crop the image if cropping is not required

Reported by: azaozz Owned by:
Milestone: 4.9.1 Priority: high
Severity: normal Version:
Component: Customize Keywords: needs-testing needs-patch
Focuses: Cc:

Description

This is a long time standing UX "weirdness". When using "the Cropper" in the Customizer, it forces the user to crop the selected image even when it only requires scaling. To reproduce:

  • Open the Customizer and go to setting a site icon.
  • Upload an image that is square, I tested with 800 x 800px. We require 512 x 512px image for site icon, so the uploaded image only needs to be scaled. However on the next screen there is no "Skip cropping" button. If the users wants to use the whole image, they will have to "crop" it at 100% x 100% to get to the next step.

Attachments (1)

36441.0.diff (1.3 KB) - added by westonruter 7 months ago.

Download all attachments as: .zip

Change History (19)

#1 @azaozz
19 months ago

  • Summary changed from Customizer: when setting heared image, site icon and logo, do not force the user to crop the image if cropping is not required to Customizer: when setting header image, site icon and logo, do not force the user to crop the image if cropping is not required

#2 @westonruter
19 months ago

For missing condition to allow cropping, see 36412.mustBeCropped.diff.

#3 @melchoyce
7 months ago

@westonruter Was this fixed?

#4 @westonruter
7 months ago

  • Keywords needs-patch added
  • Milestone changed from Future Release to 4.7.4

@melchoyce it doesn't appear so. I just tried selecting a 800x800 image for the site icon and I wasn't able to skip cropping.

This would seem like quick win territory.

@westonruter
7 months ago

#5 @westonruter
7 months ago

  • Keywords has-patch needs-testing added; needs-patch removed

See 36441.0.diff.

The key change here is that if the aspect ratio of the selected image is the same as the required aspect ratio, then it allows cropping to be skipped.

What I'm not certain about now is, if you skip cropping, whether the theme will be able to get the best image size when displaying. For example, the_custom_logo() will currently use the full size, which here is wrong. Instead it should be asking for the array( $width, $height ) as defined when you added custom-logo theme support. This assumes that a theme has done an add_image_size() call with the same dimensions as the custom logo is defined to need. Presumably this would then allow wp_get_attachment_image() to get the cropped image size as opposed to getting the full size. We wouldn't want the full high res image to always be used if the user skipped cropping.

This ticket was mentioned in Slack in #core by swissspidy. View the logs.


7 months ago

#7 @westonruter
7 months ago

  • Keywords needs-patch added; has-patch removed

I think 36441.0.diff will ultimately need to be augmented further to ensure that an image size variation is created at the requested size, even if cropping was skipped due to the aspect ratio being a match. With that I think this would need to be worked alongside #21819.

@joemcgill thoughts?

#8 @westonruter
6 months ago

  • Milestone changed from 4.7.4 to 4.8

Scope seems larger than initially thought. Milestoning for 4.8 alongside #21819.

This ticket was mentioned in Slack in #core-media by melchoyce. View the logs.


6 months ago

#10 @westonruter
5 months ago

  • Milestone changed from 4.8 to Future Release

This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.


2 months ago

This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.


2 months ago

#13 @joemcgill
2 months ago

  • Milestone changed from Future Release to 4.9

This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.


2 months ago

#15 @westonruter
4 weeks ago

  • Priority changed from normal to high

Bumping priority to high for visibility and alignment with 4.9 goals, and given proximity to beta 1 deadline.

This ticket was mentioned in Slack in #core by melchoyce. View the logs.


11 days ago

This ticket was mentioned in Slack in #core by melchoyce. View the logs.


9 days ago

#18 @melchoyce
9 days ago

  • Milestone changed from 4.9 to 4.9.1
Note: See TracTickets for help on using tickets.