'Add local image to R markdown pdf

I'm trying to add a local image to a R Markdown pdf output, in the chunk

add a picture

![image1](/C:/Users/User/Pictures/Capture.PNG)

it is displayed fine, so I would of thought it would come through to the knit file? But I get the error below   [pandoc warning] Could not find image `/C:/Users/User/Pictures/Capture.PNG', skipping...

Where am I going wrong? Do I have to get it to point in a different way if it's not in my working directory?



Solution 1:[1]

```{r}
file_AB <- "path/to/AB.png"
knitr::include_graphics(file_AB)
```

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1