Welcome to AndroidCentral Thanks for the question.
Normally, if you open a App and immediately get a message that says "<App Name> has stopped working". It means that the App crashed unexpectedly. Sometimes restarting your phone can solve the problem.
What app are you using for your photos? Is there a update available for it?