Table of Contents

How to insert images with the Bootstrap 4 responsive class in kramdown.

The common markup for inserting images in kramdown is:

![Homepage screenshot](/assets/homescreen.png)

The most used way to add a class to any markup is to use inline annotations in the line below of the markup with {:class="a-class"} but in this case it should be used in the same line, so this:

![Homepage screenshot](/assets/homescreen.png){:class="img-fluid"}

generates:

<img src="/assets/rails_first_homescreen.png" alt="Homepage screenshot" class="img-fluid">
Uruguay
Marcelo Canina
I'm Marcelo Canina, a developer from Uruguay. I build websites and web-based applications from the ground up and share what I learn here.