If you were using iCloud to sync your photos, sign into your account again. If you were not using iCloud, the data are gone permanently from your "flashed" device and you will have to try to recover them by using a backup you made or sending them to friends.
Read this support article to learn how to sign in with an Apple Account on various kinds of devices --> Sign in to your Apple Account on the web or in your device settings - Apple Support
This post by ASC contributor Lawrence Finch includes a list of places you can check where you may still have copies of photos.
Recovery permanent deleted photos - Apple Community