Modified how ImageAttachment model handles file extensions.