Centering images in blogdown post

How do you center your images on blog posts? I use the "Insert Image" Add-in and adjust the width in an effort to move the image around..but that just messes with the resolution of the image!

Right now, once I use the Add-in, I get this code. Is there anything I can add to this line of code?

![NHL Playoffs](playoff-hit.gif){width=800px height=350px}
<p align="center">
![NHL Playoffs](https://www.sporttechie.com/wp-content/uploads/2015/09/6a0134857a2da9970c0147e32cff45970b-800wi.jpg)
</p>

AFAIK, the markdowns have no image alignment tags, but the above works in regular markdown and RMarkdown

2 Likes

This is great. Thanks!

Also, how would I adjust the size of the image with your code?

I'd like width=800px height=350px

1 Like

Answering my own question here:

Add {width=800px height=350px} after the brackets ()

1 Like

I think you can also do:

<center>
![NHL Playoffs](playoff-hit.gif){width=800px height=350px}
</center> 

although I haven't tested this

4 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.