Image path for blogdown

How to include external images to a hugo post?

Suppose we have a file img1.png in project1, ie., project1/img1.png. Do this:

  1. Copy your folder with images to static/.
  2. Use this path in your blogdown post: /project/img1.png.
Mind the leading slash!

Example time

This code (on my machine) ![](/images/textmining/tidytext-crop.png){ width="20%" }

renders this:

Note the nice width option.

Knitr way

The knitr way works similarly: