@blocker/markdown-it-image-proxy

0.1.0 • Public • Published

@blocker/markdown-it-image-proxy

Automatically prefix a Proxy URL for images.

Sometimes, you don't want to load remote content without some backend filtering, or any may be your motives.

One example, https://steemitimages.com/0x0/http://original-url-here.com

Install

npm install --save @blocker/markdown-it-image-proxy
// or
yarn add @blocker/markdown-it-image-proxy

Usage

const MarkdownIt = require('markdown-it')
const imageProxy = require('@blocker/markdown-it-image-proxy')

const md = new MarkdownIt()
md.use(imageProxy, {
  // default proxy URL prefix.
  proxy: 'https://steemitimages.com/0x0/',
  // bypass for images on the following domains (defaults to none).
  trusted: [
    'https://i.imgur.com',
    'https://image.ibb.co'
  ]
})

Package Sidebar

Install

npm i @blocker/markdown-it-image-proxy

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

18.8 kB

Total Files

15

Last publish

Collaborators

  • hernandev
  • vinicius-reis