added display check for image type in media gallery