Welcome to Android Central forums.
I'm struggling to follow your post. The way the situation is described there are a lot of possibilities what you might mean. I think we would be guessing or assuming too much, so just a few questions before we try to offer advice.
At the end of your post you mention a method of taking photos with the camera app, them appearing in the Google Photos app, but do not describe the method you are using in the first part of your post. Is the method the same just over wifi instead of network data? Please detail the steps you are taking acquire or take the photos, and the method you use to send the photos. Be as detailed as possible.
What app are you using to "text" your friend? It is not unusual for users to call any messaging, whether that is WhatsApp or Facebook Messenger, as "texting", even though those things are not true SMS.
How many images were sent? I ask because, let's say you sent 20 images and attempted to view one of them before it was fully uploaded/sent perhaps it would appear as unavailable. Later if you were to try it the image would open because the phone was no longer using it.
You say that you are able to see the photos that you are not able to open, but are you able to see and open other photos in this thread? Perhaps ones from a time when you sent them with network data?
Is this first time this has happened?
Being on wifi is fairly common and I would have to imagine that you've sent photos while on wifi in the past. In my mind, I struggle to connect wifi vs network data to this issue but we'll know more with your answers.