Pictures can not be displayed problem solving Hexo

Version: Hexo 3 above  

I encountered a problem does not show the picture after a recent deployment to build hexo blog as:

 

Internet to find a lot of ways to solve the problem are not perfect, and later took a look at the official document finally solved the problem (perfect solution), now posted below. After also I suggest that you have a problem go see the official document: https://hexo.io/zh-cn/docs

Solutions are as follows:

  1. In the configuration file under the root directory _config.ymlhas the post_asset_folder:false改为true. So when creating files Hexowill automatically create a folder with the same name as the article so that you can put all the resources (picture) associated with the articles are placed in that folder to facilitate later reference. As test.jpg here I put a picture.

  2. git bash install plug: npm install https://github.com/7ym0n/hexo-asset-image --save (this is a modified plug-in, has been tested and no problem), use this plug-in to the introduction of the picture, rather than the traditional method md relative path syntax in those online say.

  3. When inserting this manner Image: { % asset_img test.jpg This IS AN Test Image% }

     Test.jpg which is the picture you want to reference, here is my test.jpg, behind This is an test image is a picture description, can modify their own.

  4. Such a display can be successful, it test: HEXO Cl && && HEXO D G HEXO

 

 

 

Guess you like

Origin www.cnblogs.com/Jesee/p/11234387.html