tatsy / markdown-it-imsize

markdown-it plugin for size-specified image markups.
46 stars 93 forks source link

Multiple image resolutions #7

Closed unindented closed 8 years ago

unindented commented 8 years ago

How hard would it be to implement srcset generation? So if I have foo.png and foo@2x.png, then this:

![](foo.png)

Would generate this:

<img src="foo.png" srcset="foo.png 1x, foo@2x.png 2x" alt="" width="256" height="256" />
tatsy commented 8 years ago

Hello, @unindented.

Actually, I got a similar question before and I made a different package markdown-it-responsive to support responsive images.

markdown-it-responsive

I think the functional you mentioned is close to this. First, please take a look at this repository. To be honest, I don't update markdown-it-reponsive, so you may have a problem. If so, could you open a new issue?

Thank you.

unindented commented 8 years ago

@tatsy will do, thank you very much.