Customize `img` rendering using Markdown Render Hooks

I did a full rebuild, but it looks like it still isn’t working. :frowning:

Okay, we will continue the investigation. :blush: What about the logs, are they all good? No errors or warnings during the rebuild?

Also, this might come off as a bit of a “have you tried turning it off and on again” kind of question, but just to be on the safe side I’m asking it anyway: are you using Markdown syntax in your blog posts? Like this:


I am, but weirdly I just went to edit my latest post with an image attached, to show you and the image is embedded with HTML:

Lovely walk in the wood behind our house this evening.

<img src="" width="600" height="450" alt="">

I did, definitely, one million percent use markdown. Pinky promise. :blush:

Okay, if you change it to Markdown syntax, does your custom Markdown Render Hook apply then?

:tada: YES! That’s it! Here’s what I see now:

<img src="" alt="">

It’s down from a couple MB to ~120KB…this is perfect!

Question now is, why is it inserting the images as HTML when I post via the WebUI or the app? I created a couple of test posts, one from the WebUI and other from the iOS app. Both times it parsed the images as HTML in the posts:

<!-- From WebUI -->
<img src="" width="600" height="450" alt="">

<!-- From iOS app -->
<img src="" width="600" height="600" alt="">

If I then edit the post source to be markdown, it work as expected.

It’s just a design decision by @manton. Other clients might insert Markdown instead or let you choose. Gluon, for example, uses Markdown when you inline an image.

Whichever app you use, you always have the option to write Markdown manually.