lonekorean/wordpress-export-to-markdown

Images still link to old wordpress wp-content directory

Closed this issue · 2 comments

First of all, great script, thank you for creating it!

Export went ok, but in the index.md file the image links still point to the old location:

Example:

[![](https://www.domain.com/wp-content/uploads/2019/04/image.jpg)](https://www.domain.com/wp-content/uploads/2019/04/image.jpg)

I would have expected that the link in the .md file points to the images directory which has been created in the posts folder:

[![](./images/image.jpg)](./images/image.jpg)

Answering my own question:

I did not understand the last option in the wizard so I set it to "No" which was the reason.

So in order to link to the new location you need to set it to "Yes"

? Save images scraped from post body content? Yes

Hm, I'm having the same issue, but I did specify "Yes". 🤔

npx wordpress-export-to-markdown --input ~/Downloads/export.xml --year-folders false --month-folders false --post-folders false --prefix-date false --save-attached-images true --save-scraped-images true --include-other-types false --output blog

Any ideas? The images are downloaded, but in the markdown, it's still pointing to the online version rather than the local ones.