jordanjay29 I've just added width/height attributes to the default IMG BBCode so they will become usable in whichever version of Flarum uses the next version of the library. I have no plan to add support for dimensions in the Litedown plugin though.

If you want to support dimensions in Flarum's Markdown extension you can use a custom match for it:

$configurator->Preg->match(
	'/!\\[(?<alt>.*?)\\]\\((?<src>\\S+)(?: =(?<width>\\d+)x(?<height>\\d+))?\\)/',
	'IMG'
);
3 years later

Is this implemented on b14 or not? Because it's a big + if we can add an image size

    Amarok Flarum is using the latest version of TextFormatter, so I imagine the changes mentioned by @JoshyPHP are available. You can give it a test under our test tag here or on our demo forums if you don't have a forum to check yourself.

      The commit linked by JoshyPHP seems to indicate this was added for bbcode only.

      Markdown compatibility seems to be possible with the snippet shared in his post.

      This seems to work:

      [img width=30 height=30]https://discuss.flarum.org/assets/header.png[/img]