Added mccutchen's fix to skip unsupported image formats.