iPhones include quality cameras capable of storing and displaying every photo you take. They’re incredibly convenient and easy to take for granted—until it’s too late. What happens when you accidentally delete valuable photos from your phone?

Fortunately, if you realize your mistake fairly quickly—within a month or so—you can often get them back. At the very bottom of your Albums screen, you’ll find your Recently Deleted photos. View the photo you want to get back and tap on the Recover button. Easy!

But after around 40 days, those images are deleted permanently—and while there are ways to recover deleted photos directly from your iPhone, they are not guaranteed and often expensive.

Can you turn to iCloud instead? That’s unlikely but possible.

In fact, it’s a difficult question to answer: the relationship between iCloud and your photos is complicated. Unless you’ve checked a box somewhere in your photo settings, you may not have any photos in iCloud.

We’ll take some time in this article to clearly explain the situation and let you know how you can recover your photos from iCloud when it’s possible to do so.

1. Not Helpful: Your Photo Stream Might Be Stored in iCloud

Your Photo Stream sends all of the photos you have taken over the last month to iCloud. You can turn it on and off from the Photos section of the Settings app on your iPhone.

Upload your last 30 days of new photos and view them on your other devices using My Photo Stream. Photos from other devices can be viewed in the My Photo Stream album, but are not automatically saved to your library. (StackExchange)

Unfortunately, this won’t help you get permanently deleted photos back. Anything in your Photo Stream will still be found in your Recently Deleted album.

2. Not Helpful: Your Photo Library Might Be Stored in iCloud

iCloud Photos stores your entire photo library in iCloud. From here, it can be synced to your other computers and devices or accessed online from the iCloud.com website.

Because you’ll probably have to pay for additional iCloud storage, this isn’t turned on by default. You can do that from the Photos section of the Settings app on your iPhone.

Unfortunately, this won’t help you when you delete a photo from your iPhone since that means it will be deleted from iCloud Photos as well. But it’s a convenient way to get your photos onto a new phone.

3. Possibly Helpful: Your Photos Might Be Backed Up in iCloud

You can also use iCloud to back up your iPhone. This backs up most of your data unless it’s already in iCloud.

Will your photos be backed up? Yes, unless you are using iCloud Photos, which we discussed above.

[iCloud backups] do not include information already stored in iCloud such as Contacts, Calendars, Bookmarks, Notes, Reminders, Voice Memos4, Messages in iCloud, iCloud Photos and shared photos. (Apple Support)

You can turn on iCloud Backup from the iCloud section of your phone’s Settings app.

Automatically back up data such as your accounts, documents, Home configuration and settings when this iPhone is connected to power, locked and on Wi-Fi.

Is this helpful? Maybe, but probably not. Most people who pay for extra iCloud storage would also take advantage of iCloud Photos—which means their photos won’t be backed up to iCloud.

But if you’re using iCloud Backup and not iCloud Photos, your deleted photos may be in a backup file on iCloud. Unfortunately, restoring that backup will overwrite everything on your phone. That means you’ll lose any new photos and documents created since that backup. That’s not ideal either.

The solution is to use data recovery software. These apps may be able to recover your photos directly from your iPhone, but that’s time-consuming and not guaranteed. Fortunately, many of these apps will allow you to cherry-pick just the photos you want from your iCloud backup. Learn more in our Best iPhone Data Recovery Software roundup.

Final Thoughts

In most cases, iCloud is of little help in recovering lost photos or any other type of files. In my mind, this means that Apple just hasn’t thought through the problem carefully enough. You’ll need to use alternate and third-party workarounds to get the job done.

Backing up your iPhone to your Mac or PC will create a backup of your photos. This is a manual task that you’ll have to remember to do from time to time. Most data recovery applications that can extract photos from iCloud can extract them from iTunes as well.

Some web services can back up your iPhone’s photos automatically. You may have to shell out some cash, but you’ll get significant peace of mind. Some examples are Dropbox, Google Photos, Flickr, Snapfish, Prime Photos from Amazon, and Microsoft OneDrive.

Finally, you may want to consider a third-party cloud backup solution. Many of the best services support iOS.