See if this support guide can help you:
Get help with the camera on your iPhone, iPad, or iPod touch - Apple Support
Try also a forced restart of your iP8:
Press and quickly release the Volume Up button. Press and quickly release the Volume Down button. Then, press and hold the Side button until you see the Apple logo, then release the side button.
If you have no improvements, contact the nearest Apple Store and have your device inspected.
Regards
Giulio