Reputation: 105
Ive got a strange task. Specifically i want to check for insane media file sizes for now. If possible, it would be nice if i could take image dimensions into consideration as well. For example, it's acceptable if a large image takes up 80kb, but not for a 20x20 px image.
Upvotes: 1
Views: 495
Reputation: 20475
Going off @BoltClock's comment, you would need to define what makes an image optimized vs non-optimized.
Something like a definition table to go off of in your validation:
The above could be checked easily (without GD for instance) using something like the getimagesize() function.
Upvotes: 1