My Lumia 640 has the same issue. It's not a very convenient work-around, but I did figure out a way to attach photos to messages, Facebook, etc. When it fails in searching for pictures to attach and goes back to the message as you state in the original post, you need to go to settings>system>storage sense, then where it says "store new music, videos, and podcasts on my" you need to switch it to phone for just a second, then switch it back to SD card again. Then when you hold the back arrow and choose the screen with the message you were working on and try to attach a picture again, this time you should see the little dots going across the top of the screen as it actually searches for and finds your pictures. A pain in the rear, since you have to do this every time you want to attach a picture, but at least it works.