After I imported posts from wordpress

I have imported old posts from wordpress to ghosts. but there are 2 problems:

  • the cover image is empty even though the ghost plugin saved the images from wordpress,
  • I need to batch remove images inside the post with a script. how can I do that?

I can’t show the result right now because I tested it on a local ghost install. but the images inside post have a caption tag next to it. I can’t do this manually, it would require too much time.