When you select an image or video, iOS downloads the full-resolution version.

Source: How Optimized iPhone Storage works with iCloud Photo Library