@philalexeev/base64-img-cli
package automatically converts all your base64 to separate images and vice versa and replace paths in your html
Last updated 4 months ago by philalexeev .
ISC · Original npm · Tarball · package.json
$ cnpm install @philalexeev/base64-img-cli -g
SYNC missed versions from official npm registry.

base64-img-cli

This package automatically converts all your base64 to separate images and vice versa and replace paths in your html.

Installation

npm i base64-img-cli -g

Usage

base64img --mode <type-of-mode> [--folder <your-folder-path>] [--files <glob-for-your-files>] [--removeImgFolder]

Arguments:

--mode - type of mode. (toImg converts base64 to seperate images. toBase64 converts images to base64)

--folder specifies the folder name where your images will be placed. Required only if the type of mode is toImg

--files is optional. Specifies the search pattern for the files you want to parse. If not specified, only ./index.html will be parsed

--removeImgFolder is optional. Removes the folder where your images were placed. Used only in toBase64 mode

Examples:

Decode to separate images from base64

base64img --mode toImg --folder my-img-folder --files ./**/*.html

Will parse all *.html files in folders and subfolders, covert all base64 to separate images, place them to my-image-folder and replace all the paths in html files.

Encode to base64 from images

base64img --mode toBase64 --removeImgFolder

Will parse index.html file in the root folder, covert all images to base64 with replacing all the paths and also remove folder(s) where the source images were placed


Based on base64-img

Current Tags

  • 1.0.0                                ...           latest (4 months ago)

1 Versions

  • 1.0.0                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |