I want to take my iPhone to factory settings

Will I lose all my photos on my iPad that I share with my phone?
If you use iCloud Photo Library then you shouldn't lose any Photos. Just make sure the feature is enabled in Settings > iCloud > Photos.
When you elect to restore your iPhone to its native state then you will lose everything that was not installed by Apple currently "on the device". Of course, if you created backups, you can restore the items. With that in mind, if you're simply trying to reset all settings to their default then you will not lose any of your data currently on the phone.
@Just_Me_D is referring to the difference between resetting all settings and resetting all content and settings. Both options are found under Settings > General > Reset.
035c20c1b8f48b7e92875d74718a1cda.jpg
If you're trying to fix a problem, try the reset all settings first. If you're really stuck or you want to clear some space and start new, erase all content and settings is perfect.
As long as you have a back up in iCloud, your photos should be safe. Doesn't need to be iCloud Photo Library.

Original thread: https://forums.imore.com/threads/i-want-to-take-my-iphone-to-factory-settings.348992/