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

fs-imagesize

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-imagesize

Set images size with react-markdown

latest
Source
npmnpm
Version
0.1.3
Version published
Weekly downloads
13
62.5%
Maintainers
1
Weekly downloads
 
Created
Source

react-markdown plugin to set images size.

A simple to use plugin to set images width property.

Basically, images are displayed in their full size when you use react-markdown. This can cause them to overlap their parent element or to be displayed too small. With this plugin the width property can be set very easily.

Install

npm install fs-imagesize

Simple to use

import React from "react";
import ReactMarkdown from "react-markdown";
import imageSize from "fs-imagesize";

function MyComponent(props) {
    return (
        <React.Fragment>
            <ReactMarkdown plugins={[[imageSize, {width: "230px"}]]}>![Image](https://anyImageUrl.png)</ReactMarkdown>
        </React.Fragment>)
}

The width property can be set to any pixel/percent size. If it not set the default value is 100%.

Keywords

react-markdown

FAQs

Package last updated on 17 Jul 2022

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