To retrieve lost photos from an iCloud backup on Apple devices that run on iOS version 8.1 or newer, access the iCloud Photo Library after restoring the device, and your photos should start downloading automatically. However, this feature only works if the iCloud Photo Library option was activated prior to losing the photos. If the option was inactive, or if you’re using an older iOS version, the photos should automatically download as part of the iCloud backup.
To download your photos via the iCloud Photo Library feature, access the Settings screen, select the iCloud option, and then select the Photos option to initiate the download process. Before doing this, restore your device from an iCloud backup by accessing the Settings screen, selecting General, selecting Reset and tapping the Erase All Content and Settings option. Once the Setup Assistant screen appears, tap the Set Up Your Device option, tap Restore From a Backup, sign in to iCloud, and choose the backup file.
ICloud stores photos in My Photo Stream for 30 days, and they’re not part of the iCloud backup or the iCloud Photo Library. The only way to restore these photos is if you saved them to the Photo Library or Camera Roll albums prior to losing them, allowing them to be stored as part of the backup. Restoring photos to an Apple device requires an iCloud backup specific to that device type.