Just a,few ideas..
Are you using one ui 6? There maybe a bug
Make sure all your apps are up to date for Samsung ans google apps
Try clearing the app cache for the gallery.
Try taking pictures with different settings and see if thar makes a,dufference
Try editing older pictures and see if you can edit them