New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

embedimagelinks

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

embedimagelinks

Converts image link in your HTML's text nodes to to img tags

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Converts image links in your HTML's text nodes to to img tags

Import

const embedImageLinks = require('embedimagelinks')

Example Usage

...
const newHTML = await embedImageLinks("<p>https://gyazo.com/da87b8bc2d1796ff6e21efaf8ba8b838</p>")
//output: <p><img src="https://gyazo.com/da87b8bc2d1796ff6e21efaf8ba8b838"></p>
...

Options

All options default to true

{
//Checks for known Gyazo screenshot links and display's it's image source
gyazo: boolean, 
//Checks for known Imgur screenshot links and display's an Imgur oEmbed
imgur: boolean, 
//Will assume that any link that ends with .png, .jpg, or .gif is an image link and displays it
imgFile: boolean, 
}

Keywords

oembed

FAQs

Package last updated on 06 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts