This gem allows you to find the size of an image using Ruby. WWW: http://imagesize.rubyforge.org/