markdown-it-responsive
A markdown-it plugin for responsive images. This plugin overloads original image renderer of markdown-it.
Usage
Enable plugin
var md = html: true linkify: true typography: true; // <-- this use(package_name) is required
How to specify options?
The notation to specify responsive sizes is as follows.
var option = responsive: 'srcset': 'header-*': width: 320 rename: suffix: '-small' width: 640 rename: suffix: '-medium' 'sizes': 'header-*': '(min-width: 36em) 33.3vw, 100vw' ;
Example
With the options above, a markdown
![test](header-test.png)
is rendered as