Problem/Motivation
Before a user uploads an image, if there is a maximum dimension set, the help text reads, for example:
"Images must be smaller than 100x100 pixels." This confuses the user since the image can be automatically resized to accommodate these limits. We therefore replace it with, "Images larger than 100x100 pixels will be resized."
Before the patch
Proposed resolution
Alter the text to be more accurate.
Also, see issues #16 through #33 suggesting that checking for the presence of an image toolkit should not be necessary, as a D8 installation without a toolkit is an edge case, and therefore a condition that is practically impossible to trigger.
After the patch in #31
Remaining tasks
Backport it to D7. Note that D7 version should have consideration for !ImageToolkit::isAvailable() (or functional D7 equivalent)
Task | Novice task? | Contributor instructions | Complete? | |
---|---|---|---|---|
Create a patch | Instructions | Yes | ||
Embed before and after screenshots in the issue summary | Novice | Instructions | Yes | |
Backport the Changes to an Earlier Version of Drupal Core | Novice | Instructions |
User interface changes
Changes user interface text to read: "Images larger than !max pixels will be resized".
Similar changes to the case where both a minimum and maximum resolution are specified.
The message about *minimum* dimensions (only) is not changed.
API changes
String is used in file file.field.inc line 931.
if/else block says:
- if there's a toolkit, resize the image
- else, just reject it for being too large.
Related Issues
See #847098: Revise image field settings form for clearer ui and usability.
Original report by fietserwin
Should read something like "Images larger than !max pixels will be resized". For the exact choice of text perhaps have a look at #311159: Inaccurate/misleading user text. String is used in file file.field.inc line 931.