10

I can't find a way to insert an inline image on a markdown document I'm producing with RStudio.

Seems like the RmarkDown Style Cheat sheet (https://www.rstudio.com/wp-content/uploads/2016/03/rmarkdown-cheatsheet-2.0.pdf) does not mention such feature.

Is this currently possible?

Here's an example using html for a svg image: link: http://www.herongyang.com/HTML/HTML5-Add-Inline-SVG-Image-HTML5-Documents.html

enter image description here

Dan
  • 1,711
  • 2
  • 24
  • 39
  • What do you mean with 'inline image'? – J_F Mar 31 '17 at 19:40
  • @J_F example: inserting a small flag image after country_name: `http://www.herongyang.com/HTML/HTML5-Add-Inline-SVG-Image-HTML5-Documents.html`. I want this image to be part of the text, inside a paragraph. Clear as mud? – Dan Mar 31 '17 at 20:12
  • @mb21 I've updated my packages and `foo ![]() bar` now works. I was probably doing somehting stupid. Do you want to add this answer and I'll accept it? Thanks. – Dan Apr 03 '17 at 12:42

2 Answers2

13

Markdown syntax allows inline images:

foo ![](image.png) bar
mb21
  • 34,845
  • 8
  • 116
  • 142
6

Could also use the display property

![](images.png?display=inline-block)
Azure562
  • 59
  • 1
  • 2
  • interesting addition, Qing. Thanks! – Dan May 24 '18 at 21:46
  • 2
    I found this thread when trying to do the same: adding an inline image. Don't know why but the `foo ![]() bar` doesn't work for me. Stayed with html for some time, i.e., ``. Only recently stumbled upon this solution. Hope it helps. – Azure562 May 29 '18 at 13:53