Image References? #99

Closed
opened 2026-01-29 14:26:34 +00:00 by claunia · 3 comments
Owner

Originally created by @RickStrahl on GitHub (Mar 12, 2017).

Wondering if Image References (as per are working in Markdig?

This does not work for me:

![](configicons)

...

[configicons]: configicons.png "title for image"

I noticed #51 talks about image references, but not sure where that comes in. Could I just be missing an extension (although I have most enabled)?

Originally created by @RickStrahl on GitHub (Mar 12, 2017). Wondering if Image References ([as per](https://daringfireball.net/projects/markdown/syntax#img ) are working in Markdig? This does not work for me: ```markdown ![](configicons) ... [configicons]: configicons.png "title for image" ``` I noticed #51 talks about image references, but not sure where that comes in. Could I just be missing an extension (although I have most enabled)?
claunia added the invalid label 2026-01-29 14:26:34 +00:00
Author
Owner

@xoofx commented on GitHub (Mar 12, 2017):

The specs of Images in CommonMark expect that after paranthesis after a link (...) are an URL only. You need to use bracket [...] for the id, as you can verify this on babelmark3

![][configicons]

...

[configicons]: configicons.png "title for image"
@xoofx commented on GitHub (Mar 12, 2017): The specs of [Images in CommonMark](http://spec.commonmark.org/0.27/#images) expect that after paranthesis after a link `(...)` are an URL only. You need to use bracket `[...]` for the id, as you can verify this on [babelmark3](https://babelmark.github.io/?text=!%5B%5D%5Bconfigicons%5D%0A%0A...%0A%0A%5Bconfigicons%5D%3A+configicons.png+%22title+for+image%22) ```md ![][configicons] ... [configicons]: configicons.png "title for image" ```
Author
Owner

@RickStrahl commented on GitHub (Mar 13, 2017):

Duh - sorry my bad :-) Thanks and it works great.

Good use case for this BTW: Embedding base64 encoded image content at the end of the document.

@RickStrahl commented on GitHub (Mar 13, 2017): Duh - sorry my bad :-) Thanks and it works great. Good use case for this BTW: Embedding base64 encoded image content at the end of the document.
Author
Owner

@xoofx commented on GitHub (Mar 13, 2017):

Note that you can also use ![configicons] alone (it will just set the alttext to configicons)

Good use case for this BTW: Embedding base64 encoded image content at the ends of the document.

Indeed, good idea!

@xoofx commented on GitHub (Mar 13, 2017): Note that you can also use `![configicons]` alone (it will just set the alttext to `configicons`) > Good use case for this BTW: Embedding base64 encoded image content at the ends of the document. Indeed, good idea!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#99