How to add image size validation to Django backend?

Is it possible to add validation to my project when a user uploads an image? Meaning, I want the user to upload an image that is at least 500x500 in size (this is an example size). I see that I can get the size back in bytes, but nothing related to the pixel count.

You can add validator to your model: https://github.com/homm/iamshare/blob/b7b5384c02987b6d340ee1c2d79f2478a2ccae8e/imageshare/models.py#L9

Also you can perform validation on front-end, even before an image gets uploaded:  https://uploadcare.com/cookbook/validation/