markdown-it-imgix
Apply an imgix domain and parameters to markdown images.
Install
$ npm install markdown-it-imgix --save
Usage
const Markdown = ;const imgix = ; const md = ; const str = `text with\n\n![](/another/path/img.png)\n\n![](/example/path/fig.png)\n\nanother paragraph` const res = md; console;
Options
You can supply either a single object with the following params, or an array of objects to perform multiple replacements.
match
: (required) url / path patterns to match for replacementdomain
: (required) imgix domain that will replace the matchparams
: imgix api params to apply for this matchsecureUrl
: if you want to use https and have a ssl-enabled imgix domain