you have an interesting concept here.. in theory a js can block images by their size however there's only one way of doing it which in application contradicts the whole theory of it.
to be able to 'fetch' the image size means the image has to be downloaded first but not necessarily displayed.. that means that before displaying any images on a site..every image has to be cached first to retrieve the size and then according to the size and your settings to maximum size permissions, the browser decides what images meets size criteria to display meaning that instead of speeding up site load it would actually be delayed.
a better imaginary method to apply the restrictions is if the image size was included in a tag or some sort of html header that the browser can read to know what size every image is.. that would make it very easy and quite functional but this can only happen by setting a new standard that all images must include a size tag.
it's a very good idea but you have to take it to the w3 consortium first