Opened 9 years ago
Closed 9 years ago
#36256 closed defect (bug) (fixed)
Custom Logo: Customizer display should match theme crop
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | Customize | Keywords: | has-patch |
Focuses: | Cc: |
Attachments (2)
Change History (13)
#2
@
9 years ago
Actually, it seems this would be resolved by the patch on #36255, since the action of cropping an image results in a new image with those cropped dimensions being the full
size.
This ticket was mentioned in Slack in #core by mike. View the logs.
9 years ago
This ticket was mentioned in Slack in #core by mike. View the logs.
9 years ago
#6
@
9 years ago
- Milestone changed from 4.5 to Future Release
This doesn't look to have been fixed by [37077] in #36255.
Chatted with @obenland, who notes that it's still a problem when the cropped size is larger than medium because, "It uses medium when available and falls back to full otherwise."
Given RC timeline, since this is a problem with WP_Customize_Media_Control::content_template
rather than Custom Logo, and it would apply to any control that uses it, moving this to Future Release.
If a reasonable solution for Custom Logo is found (that would not affect backcompat for other controls), would consider inclusion.
#7
@
9 years ago
- Keywords has-patch added
- Milestone changed from Future Release to 4.5
If we check for the control type (separate from mime_type), we can fix this for all cropped image controls by always using the full size there (which is constrained in CSS to fit). When cropped, the full size is probably not excessively large, and this actually fixes what would be a bug for any other cropped image controls as well with no impact on back-compat.
See 36256.diff - I think this is a small enough change to go in now so moving back to 4.5 for consideration.
This ticket was mentioned in Slack in #core by obenland. View the logs.
9 years ago
#9
@
9 years ago
@mor10 Does 36256.diff resolve this issue for you?
I'm not entirely sure about this. I think it makes sense that the preview is where the actual image size is used since that is where the preview is happening. The image appearing in the control would be more “meta” to indicate which image is chosen, not exactly how it appears. Otherwise, the same image would be displayed twice. Compare, for example, the site title and tagline: the text boxes show the raw database value whereas the preview shows the values as filtered by
wptexturize
and whatever the theme & plugins are doing.If the actual image size for the logo were to be used in the control, it would require a couple changes:
1) The
\WP_Customize_Media_Control::content_template
is hard-coded to use themedium
orfull
image sizes. So it would have to be updated to allow other image sizes to be used: https://core.trac.wordpress.org/browser/tags/4.4.2/src/wp-includes/customize/class-wp-customize-media-control.php?marks=161-164#L1542) The change in [36839] would need to be reverted/modified to allow the custom image sizes to be returned in Ajax requests. See #36096.