Wouldn't you still have the copy on the device or memory card you took the photo from as an alternate source to restore from? Just avoid wiping that until you have two other copies.
Granted, if your iPhone is offline for extended periods of time, you're also doing it wrong. But maybe you have an iPod Touch instead.
[0] For the last few years, the newest iPhone is the #1 most common camera model found in EXIF data on Flickr, http://petapixel.com/2015/01/09/popular-cameras-flickr-2014/. IIRC, Facebook saw similar results for photo uploads.