filtering out non JPG images that won't display