Just as an aside, if you're already using ImageMagick to make the image of viewable size, you can tell ImageMagick to do exactly the decision you mention.
For example, to keep small images small, but also to resize images bigger than 500x500, use
-geometry '500x500>' (with the greater-than sign). This tells it to resize
only if the image is greater than your specified limit.
--
[ e d @ h a l l e y . c c ]