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

droplet’s picture

Version: 7.x-dev » 8.x-dev
claudiu.cristea’s picture

Status: Active » Closed (works as designed)

Yes, 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.