How does iCloud Photo Library save space on my device?
If you turn on Optimize [device] Storage, iCloud Photo Library will automatically manage the size of your library on your iOS device, so you can make the most of your device's storage and access more photos than ever. iCloud Photo Library stores the original, high-resolution photos and videos in iCloud and can keep lightweight, device-optimized versions on each of your devices. As long as you have enough storage, recent photos and videos that you access the most will stay on your device at full resolution.
You can turn on Optimize [device] Storage from Settings > iCloud > Photos or Settings > Photos & Camera > iCloud Photo Library on your iPhone, iPad, or iPod touch. You need an Internet connection to access an original photo or video that’s stored only in iCloud.