optimize slide images.