you may run a script on specific db tables to make the following:

  1. get data from database
  2. seeks for img tags (regex)
  3. downloads the image file
  4. replaces the original image url in the article
  5. saves the new article