There are two ways I have done and both worked for me. It is outlined in my article
https://brajeshwar.com/2021/brajeshwar.com-2021/#q-what-abou... and here is the gist.
1. Move all of your images and static assets (zip, downloads, pdfs, videos) that are not part of WordPress textual content to something like S3+Cloudfront. Maintain that as in a sub-domain `https://static.brajeshwar.com/` Now, start using it in your writing as `https://static.brajeshwar.com/2024/beautiful-picture.webp”>`. This makes it easy and allows you to switch WordPress hosting providers in minutes if not seconds. In my case, around late 2000s and early 2010s, I keep getting warned by Media Temple (mt) of the bandwidth and so Amazon’s S3 came to the rescue.† WordPress plugins are a galore that does the re-direct. That solved multiple problems - not tied down to a particular hosting provider, a CDN that is simple and cheap. Thus, moving out of WordPress with the text that contains those links will continue to just work.
2. Once you move to Static HTMLs, in my case, I felt that it makes more sense to just have them together in one folder — `brajeshwar.com` with everything in it — all the files. I also tend to ask the question and try answering, “Can I move out easily?” That has let me to not use images and other non-essential contents as much as I can avoid. An article/post should continue to work and be meaningful even if the images fails.
† My website was kinda of a deal back then. Now, CloudFlare claims that my website does about 4-5GB a month in bandwidth. This is after I have deleted many, delegated most downloads to Github, and to S3+ CloudFront sub-domains such as `cdn.oinam.com` and `archives.oinam.com`. During the days when (mt) complains is when it hits like 50GB a month on downloads, etc.
In all of this, these days, I pay single digit dollar every month to maintain my entire personal website and the remnants of its past. I don’t want the links from Adobe, Google, Wikipedia, the Chinese, the Russians, etc. to end up in a 404.