Images 404 after wp migration to a subdomain

Image URLs are stored within the ‘post’ entry that is the media item.

So you can change each one manually via the Media screen. Or use a search/replace plugin to do it all at once. I like the “Better Search and Replace” plugin. Just enter the old URL’s domain, and the new one. Use the ‘test’ button to see what it will do. If all is OK, then do it.

Database backups are always good before operations like these. (And a good thing in general.) I’ve used the above plugin several times without problems.