Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
remark-images
Advanced tools
remark plugin to add an improved image syntax.
npm:
npm install remark-images
Say we have the following file, example.md
:
#### A url
Below will render an image:
https://c8r-x0.s3.amazonaws.com/lab-components-macbook.jpg
And our script, example.js
, looks as follows:
const vfile = require('to-vfile')
const remark = require('remark')
const images = require('remark-images')
remark()
.use(images)
.process(vfile.readSync('example.md'), function(err, file) {
if (err) throw err
console.log(String(file))
})
Now, running node example
yields:
#### A url
Below will render an image:
[![](https://c8r-x0.s3.amazonaws.com/lab-components-macbook.jpg)](https://c8r-x0.s3.amazonaws.com/lab-components-macbook.jpg)
remark().use(images)
Add an improved image syntax.
Transform URLs in text that reference images (png
, svg
, jpg
, jpeg
, or
gif
) to images.
Supported URLs / URIs:
https://example.com/image.jpg
/image.jpg
./image.jpg
../image.jpg
See contributing.md
in remarkjs/.github
for ways
to get started.
See support.md
for ways to get help.
This project has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.
FAQs
remark plugin to add a simpler image syntax
The npm package remark-images receives a total of 9,764 weekly downloads. As such, remark-images popularity was classified as popular.
We found that remark-images demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.