Possible fixes…
- settings > messages > turn iMessage off - wait - turn back on.
- settings > general > reset > reset network settings.
- [More thorough]
If you are using any other device with iMessages, disable them all (sign out).
Then on your iPhone, go to Settings > Messages.
Turn Message “off”.
Wait 5 seconds, turn back “on” and below under Send & Receive, remove any other emails or numbers for Messaging other than your primary number.
So you just have one under that section.
Now you should be able to get pictures.
If so, now you can re-enable Messages on all your other devices.
Note: The above methods have shown varying degrees of success, works for some to regain their history, others merely get the functionality back for new photos, but don't get their old photos back.
Searching Google would indicate this is a known bug, with no real fix as yet. If you have an iCloud backup, the data should be in there - extracting it would need something like iPhone Backup Extractor but it would appear that the only way to get them back into the messages, if nothing worked so far, is wipe the phone & set up as new, then recover from the last backup.