Different image styles in Jekyll

Using markdown for writing posts is very convenient and easy, but since markdown converts to html there is not much ways to customize styles of some elements in result html, like styles of an image. Here I'll show how it could be solved.