download_image: Download an image from the web and include it in a document
Description
When including images in non-HTML output formats such as LaTeX/PDF, URLs will
not work as image paths. In this case, we have to download the images. This
function is a wrapper of xfun::download_file() and
include_graphics().
The download path (inferred from the URL by default). If the file
exists, it will not be downloaded (downloading can take time and requires
Internet connection). If you are sure the file needs to be downloaded
again, delete it beforehand.
use_file
Whether to use the URL or the download path to include the
image. By default, the URL is used for HTML output formats, and the file
path is used for other output formats.
...
Other arguments to be passed to include_graphics().