Skip to content
forked from javierbyte/img2css

Convert any image to pure CSS. Recreates images using only box-shadows.

License

Notifications You must be signed in to change notification settings

rivetin/img2css

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convert any image to pure CSS.

img2css

How does it work?

It has two different outputs, pure css shadow matrix [1] and base64 embedded image [2].

  • Pure CSS: This output was created by resizing and setting each pixel as a box-shadow of a single pixel div, so no img tag or background-image is needed. This can result in huge outputs, and the use of this output is not recommended for production unless there is no other option.
  • Base64: The entire image file is embedded inside the <img> tag using base64, so no need external hosting is needed.

Development

Run development server:

npm run dev

Build

npm run build

About

Convert any image to pure CSS. Recreates images using only box-shadows.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 71.2%
  • HTML 28.8%