Actually, the easy part was copying the image files to a new location on the web. The harder part was figuring out how to fix the references to those images in old posts. I could have edited each post by hand, but that would have been tedious and error prone. Even worse in my estimation is the edits would have caused Blogger to update my RSS feed. The old posts would look like they had been updated, when in fact I had just changed a URL or two.
To execute the code, I made two changes to my blog template. I added a <script> tag to the header:
Then I added an onload attribute to the <body> tag:
<body onload="fixImagesAndLinks('oldsite', 'mysite')">
Voila! The old URLs are now magically fixed. In a way, this is a kludge. I wouldn't recommend this approach for a production web application, but this is just a hobbyist-type blog. Sometimes a kludge is the right tool for the job.