I see a lot of people with Django apps that have image uploads are automatically resizing the images after they are uploaded. That is well and good for some cases, but I don't want to do this. Instead, I simply want to force the user to upload a file that is already the proper size.
I want to have an ImageField where I force the user to upload an image that is 100x200. If the image they upload is not exactly that size, I want the admin form to return as invalid. I would also like to be able to do the same thing for aspect ratios. I want to force the user to upload an image that is 16:9 and reject any upload that does not conform.
I already know how to get the width and height of the image, but I can't do that server-side until after the image is already uploaded, and the form is submitted successfully. How can I check this earlier, if possible?