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:

Also you can perform validation on front-end, even before an image gets uploaded: