if w != 100:
    raise forms.ValidationError(
        "The image is %i pixel wide. It's supposed to be 100px" % w)
if h != 200:
    raise forms.ValidationError(
        "The image is %i pixel high. It's supposed to be 200px" % h)
return picture


class MyAdmin(admin.ModelAdmin):
    form = myForm
admin.site.register(Example, MyAdmin)
Validate image size in django admin