Skip to content
This repository has been archived by the owner on Dec 3, 2020. It is now read-only.

Dorious/image2html

Repository files navigation


image2html

image2html is a NodeJS library and console tool that helps you generate html from png, jpg and gif files.
You can either generate html string, html dom elements, jsx string, svg or react node elements.

Installation

npm install -g image2html

or install as module...

npm install -S image2html

Use as module

import image2html from "image2html";
let files = ['/path/to/file.png'];
let i2h = new image2html(files);
i2h.render().then(output => {
    console.log(output);
});

CLI Usage

$ image2html -h
Usage: image2html [options]

Options:
-v, --version                 Output version number
-s, --scale                   Output pixel scale
-r, --render <type>           Select renderer: html, jsx, dom, react, svghtml, svgdom (default: "html")
-e, --html-element [element]  HTML/React element to use (default: "div")
-o, --output                  Output file
-h, --help                    output usage information`

About

Converts images into html elements

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published