Problem/Motivation
Some of our customers want to disable the image autoresize when images exceeds the maximum resolution defined in the field settings. They just want Drupal to reject the image because they are concerned about the quality of the images. So far, there is no option to change that behaviour.
Steps to reproduce
- Create a new content type
- Create an image field on that content type
- Set a "Maximum image resolution" of 10x10 and save the field settings
- Add a new node of that content type and upload an image greater than 10x10
- Drupal will autoresize the image down to fit the maximum resolution
Proposed resolution
Add a new radio button setting "Image resize policy" for image fields which will have two options:
- Resize proportionally
- Reject
The first option is the current behaviour and the second one is the new one. The first one is proposed to be default.
Also, for usability reasons, it has been decided to swap places for maximum dimensions and minimum dimensions fields. Moreover, for the same reasons, the new radio button is also shown under a fieldset.
Remaining tasks
None.
User interface changes
Check full resolution on #70 and #84.
Image field settings before patch:
Image field settings after patch:
Uploading oversized image with auto resize on (current situation):
Uploading oversized image with auto resize off (by using new option):