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
Turn image urls into images with remark.
npm:
npm i -S 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)
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 mdx-js/mdx
for ways to get started.
This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.
MIT © Compositor and ZEIT
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.