-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: import image #70
Conversation
@adnan360 feel free to test this. I will merge in this weekend. |
Thanks a lot. This will save a lot of time and hassle in the conversion process. I wrote a script to do this earlier. My script downloads the images in the post folder (given that Do you plan to implement the replacements in posts automatically? This would be awesome. Otherwise my script can be used for the replacement. It will just see the downloaded file, assume that it had already downloaded it and make the replacements of the wordpress (or any other) URL. The script will have to be placed in a "scripts" folder in the hexo site directory and running EDIT: It does not download images for me. It creates the post folders, but no images are there. I can access the wp image in my browser, but it did not download it, nor the imgur image. I've tested with:
|
I think it's possible with this plugin, but in future PR. I consider this PR as minimal implementation for easier review.
This PR is not compatible with
Currently,
It's out of scope for now, since imgur embed should still work after migration and original wp is taken offline. |
This feature is disabled by default for now; to use it:
Downloads all image attachments and save them according to their respective directories.
Example:
http://yourwordpress.com/wp-content/uploads/2020/07/image.jpg
=>http://yourhexo.com/2020/07/image.jpg
.I'm assuming Wordpress store images like this:
After importing the images, the posts would still embed the original image link:
User just need to (manually) replace all occurrences of
http://yourwordpress.com/wp-content/uploads
, the image embed should become:Based on sample wordpress provided by @adnan360 #64 (comment)
Closes #37