WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 22 months ago

#23713 closed defect (bug) (fixed)

Image editor: Remove help text about unsupported image upscaling

Reported by: ullemehner Owned by: markjaquith
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch commit
Focuses: Cc:

Description

I can't scale up jpg within wordpress media library, while scaling down works as expected.
A new image file like somename-e1361912486333.jpg is created, but it has exact the same size as the original file.

phpinfo() says I have gd library installed. No imagick.

I already asked in WP Forums for help, with no reaction:
http://wordpress.org/support/topic/wp-351-wp-image-editor-scaling-up-images-does-not-work

Attachments (1)

23713.diff (1.6 KB) - added by ericlewis 2 years ago.
Copy fix.

Download all attachments as: .zip

Change History (15)

comment:1 @markoheijnen2 years ago

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

You can't scale up an image with WordPress. We check for that. So when upscaling we change the size to the original.Main reason is that it doesn't make really sense since the quality will not be better when upscalling it in the browser.

You can use the filter 'image_resize_dimensions' when you want different logic but this isn't a support channel for that.

comment:2 @ullemehner2 years ago

Thanks for quick reply[[BR]]

Okay, though I don't get that logic, at least I know now, thats a feature, not a bug.
Hopefully there will be some helpful hint shown in image editor "Scale image"-Box.
Currently there is no sign, that it doesnt work as expected. German translation clearly states, that upscaled images become less sharp when upscaling.

Given the reason you mentioned, it shouldn't be possible to enter higher values for width or height than original size.

comment:3 @markoheijnen2 years ago

Well, the description is weird indeed but the whole editor flow should change. The logic isn't weird. Why upscaling an image that gets a bigger file size when you can easily do it in the browser. Probably the same quality but didn't really test it out.

comment:4 @ericlewis2 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

I just bumped into this as well - we should at least change the text on this in lieu of a UI overhaul so as to not mislead users in the meantime.

@ericlewis2 years ago

Copy fix.

comment:5 @SergeyBiryukov2 years ago

  • Keywords has-patch added
  • Milestone set to 3.6

comment:6 @markoheijnen2 years ago

  • Keywords commit added

I'm fine with this change. Still plugins can change the behavior and the text is wrong again.

comment:7 @ullemehner2 years ago

From my point of view (user) this still goes in a wrong direction.
Changing text means in consequence it has to be changed in every translation/language.

Why not just let the function image_resize_dimensions() do what its name implies: Prepairing dimensions of an image for resizing (for imagecopyresampled()). Am I wrong thinking resize includes scaling up?

comment:8 @markoheijnen2 years ago

changing in every language will happen. We got a lot of great people helping out with that.

To me you are wrong thinking that image_resize_dimensions also does scaling up. Also the function name doesn't imply if it can or can't do upscaling. So as mentioned, if you want a bigger image then original then do this in the browser.

comment:9 @ullemehner2 years ago

I dont think image_resize_dimensions also does scaling up. I know it does not. Scaling up is restricted by intended (or wrong) code. Also, it calls wp_constrain_dimensions(), which doesn't consider higher values for destination size. So no one can scale up images using image_resize_dimensions() as it is.

I was helping me out with your filter advise (thanks for this by the way), see
http://wordpress.org/support/topic/wp-351-wp-image-editor-scaling-up-images-does-not-work . I am fine with this.
But I would be happier, if my trac ticket would have lead into a little bit more than just "curing the symptom".

comment:10 @markoheijnen2 years ago

Allow upscaling in WordPress is never going be supported in core. There are no benefits for doing so. I hope that is clear to you.
Changing the UI (behavior) in 3.6 is also not going to happen since it's an enhancement and it's to late for it.

So if you have other thing to mention how we can fix it. i'm happy to listen.

comment:11 follow-up: @ocean9022 months ago

  • Summary changed from WP 3.5.1 wp-image-editor: Scaling up images does not work to Image editor: Remove help text about unsupported image upscaling

Can't we simply remove the full sentence?

comment:12 in reply to: ↑ 11 ; follow-up: @ericlewis22 months ago

Replying to ocean90:

Can't we simply remove the full sentence?

IMHO if the text sentence is removed, users will try to upscale an image, it won't work, and they'll think it's broken. We need to remark somehow this is only a scaling down function.

comment:13 in reply to: ↑ 12 @ocean9022 months ago

Replying to ericlewis:

Okay, I'm sorry, you're right. Haven't looked at the editor while writing this.

BTW: There is already a red exclamation mark, which is not very helpful I think.

comment:14 @markjaquith22 months ago

  • Owner set to markjaquith
  • Resolution set to fixed
  • Status changed from reopened to closed

In 24562:

Instead of saying that scaling up images will result in fuzzy images, just say that it's not supported (because it isn't).

fixes #23713. props ericlewis.

Note: See TracTickets for help on using tickets.