Customizing the behavior of Markdownify

So I use markdownify to include a .md file and display it on my page. The .md file contains text, links, but particularly: images. I’m using UIKit for my Site, and I would prefer if the images would use the UIKit-Image class, rather than the standard html one.
Is it possible to modify markdownify so that it does that?

If you are happy go away from markdown syntax you can make an includes file which accepts src and alt/title and adds the class

So use it like

## my heading

{% include image-styled.html src='abc.png' alt='ABC'%}

**more markdown**

And get

<img class="my-class" src="abc.png" alt="ABC"/>
1 Like

I actually managed to do it by capturing the markdownify and running the replace filter on it, but thanks! :smiley:


<img src="{{ includes.src }}" alt="{{ includes.alt }}" />

I was going to add you can replace on content at the layout level for site wide

There have been discussions the forums before on customizing links.
Those usually apply to the entire page.

Is your use case to modify every image on the page? That is possible with a plugin or putting every page’s content through a regex find and replace at the layout level. Or you can use JS to add classes or you can add CSS that applies to all img tags.