Image size validation

Hi,

I’m wondering if there is a way to add validation so that an image
being uploaded is not larger than a certain height and width (in
pixels, preferably).

Thanks,

Simon