Skip to content

Parses css and html files to replace small file by a data URI reprentation in base64.

Notifications You must be signed in to change notification settings

ymainier/inline_image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InlineImage

Description

Inline image parses css and html files to replace small file by a data URI reprentation in base64. Small files are files shorter than 1024 bytes by default. File type must be either css or html. Extension is used to determine file type, so it is important that your file end with .css or .html If file extension does not match either html or css, html will be used.

Installation

gem install inline_image

Usage and documentation

Brief usage description

inline_image help inline

Replace all image in a css file appearing in url(img/name.png) (max size 1024B)

inline_image inline /path/to/your.css

Replace all image in an html file appearing in url(img/name.png) (max size 1024B)

inline_image inline /path/to/your.html

Replace all image in a file with max size 2048B

inline_image inline /path/to/your_file --size=2048
inline_image inline /path/to/your_file -s 2048

License

Released under The Unlicense, aka public domain. See the LICENSE file for further details.

About

Parses css and html files to replace small file by a data URI reprentation in base64.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages