include_graphics()
has to be used in top-level R expressions as Yihui stated here
My workaround is this:
```{r out.width = "90%", echo=FALSE, fig.align='center'}
files <- list.files(path = paste0('../', myImgPath),
pattern = "^IMG(.*).jpg$",
full.names = TRUE)
knitr::include_graphics(files)
```