So I can sort of confirm this, but I get a slightly different result from what you report.
Here's the source of my test Rmd file:
# Define variable containing url
url <- "http://www.online-image-editor.com//styles/2014/images/example_image.png"
Since knitting to PDF can involve some tricky external system dependencies (i.e., LaTeX), I tested this on RStudio Cloud so that at least the setup isn't idiosyncratic to my specific machine and its checkered past! (I got the same results on my own machine though). Here's a link to a shared project, if you want to play with it there: https://rstudio.cloud/project/103903
I can knit to
word_document and default (self-contained)
html_document just fine with
http://-linked images (both outputs contain two adorable kittens ). You can inspect/download the successfully output HTML and Word files from the Files pane of the Cloud project.
pdf_document fails with the error:
! Package pdftex.def Error: File `http://www.online-image-editor.com//styles/20
14/images/example_image.png' not found.
I've been searching around a bit, and I can't really confirm that it's supposed to be possible to use
http:// URLs in image links when the output is PDF — the pandoc documentation only has a local path example. I'm reaching the end of my understanding of the intricacies of the handoff between
pandoc here, so I hope somebody else will come along and shed some more light.