How do I mitigate the forward slash problem for URLs of images after a WP migration?

It’s a bit odd that there are root-relative URLs, WordPress by default uses absolute URLs when inserting images. However, probably the quickest fix is to open the SQL file in a text editor and just search and replace src="https://wordpress.stackexchange.com/wp-content/ with src="/blog/wp-content/, or the absolute URL, whatever you prefer.