Upload images to hexo-based github.io portfolio
Aim
To upload images to my portfolio which is constructed by hexo-based github.io.
Procedure
1 Install plugins
Install hexo-asset-image
plugin
npm install hexo-asset-image --save
Install hexo-renderer-marked
plugin
npm install hexo-renderer-marked --save
Edit _config.yml
1 | post_asset_folder: true |
The “postAsset: false” is important due to the redundancy of generated absolute image path.
2 Insert image
With hexo-asset-image
plugin installed we make a new post:
hexo new "project name"
A new directory is automatically generated
Now we insert an image to the markdown: For instance:
Then delete all strings before ‘/‘. Now the image is invisible in Typora.
3 Insert image with specific width and captions
We note that the Furina image above is too wide. To regulate the image width, previous command to insert image is replaced by following commands:
1 | <figure> |
Now the command is applied to upload a 60% Furina:

Then perform hexo clean
hexo generate
and hexo server
to inspect the insertion of images.
pixiv id
115292447