This function is supposed to be used in R code chunks or inline R code expressions.
If the output is not pdf, then this function works the samge as knitr::include_graphics()
.
If the output is pdf, then the image will be downloaded to the img_dir directory and inserted.
If the image is in gif format, then it will be converted into png before inserted into pdf.
include_image(img_url, img_dir = "images")
The url of the image
The path of the local image directory
The same as the knitr::include_graphics()
function