Closed (works as designed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
image.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2012 at 18:45 UTC
Updated:
29 Jul 2014 at 21:10 UTC
When you upload a image bigger than the dimensions allowed the image field scales the image based on the height.
So if the exact image needs to be 300x200 and you uploaded 800x600 the height of the image would change to 200 and the width would scale (e.g. SCALEDx200).
The validation should throw an error saying exact dimensions must be met.
Comments
Comment #1
droplet commentedComment #2
claudiu.cristeaYes, this is how image filed works. It doesn't block you upload if the dimensions are over allowed values but it resize bigger images to fit the allowed boundary. In you case is correct too.
If you want to add other behaviour (e.g. invalidate the form submit in such cases), you'll need to implement an additional form validation callback.