PHPackages                             jaysalvat/image2css - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. jaysalvat/image2css

ActiveLibrary[Image &amp; Media](/categories/media)

jaysalvat/image2css
===================

Pointless Image To CSS box-shadow Converter

1.0.2(11y ago)7151.5k92MITPHPPHP &gt;=5.3.0

Since Jul 18Pushed 4mo ago51 watchersCompare

[ Source](https://github.com/jaysalvat/image2css)[ Packagist](https://packagist.org/packages/jaysalvat/image2css)[ Docs](https://github.com/jaysalvat/image2css)[ RSS](/packages/jaysalvat-image2css/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (4)Used By (0)

Image To CSS Converter
======================

[](#image-to-css-converter)

[![Latest Stable Version](https://camo.githubusercontent.com/22ee16677b976dda2fcd070a93436f91ddacbe6a06902d887f87d037e36423b8/68747470733a2f2f706f7365722e707567782e6f72672f6a617973616c7661742f696d616765326373732f762f737461626c652e737667)](https://packagist.org/packages/jaysalvat/image2css)[![License](https://camo.githubusercontent.com/d4dd951c816bf1778dfb4342142f7a65b8ce1eeb1375399112c4c9b5cc20b680/68747470733a2f2f706f7365722e707567782e6f72672f6a617973616c7661742f696d616765326373732f6c6963656e73652e737667)](https://packagist.org/packages/jaysalvat/image2css)

You suck at CSS but want to impress your friends anyway? This PHP class converts an image to thousands of CSS lines of box-shadow properties.

Demo:
-----

[](#demo)

You can see a demonstration on [CodePen.io](http://codepen.io/jaysalvat/pen/HaqBf).

Installation:
-------------

[](#installation)

Create a [composer.json](https://getcomposer.org/) file with:

```
{
   "require": {
       "jaysalvat/image2css": "~1.0"
   }
}

```

And run [Composer](https://getcomposer.org/) to install Image2Css.

```
$ curl -sS https://getcomposer.org/installer | php
$ composer.phar install

```

Example:
--------

[](#example)

```
$img = new \Image2Css\Converter("monalisa.jpg");
$img->setWidth(200);
$img->setPixelSize(4);
$img->setBlur(4);

echo $img->computeStyle();

```

Note:
-----

[](#note)

GD extension required.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance52

Moderate activity, may be stable

Popularity40

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 96% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

4356d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/55496?v=4)[Jay Salvat](/maintainers/jaysalvat)[@jaysalvat](https://github.com/jaysalvat)

---

Top Contributors

[![jaysalvat](https://avatars.githubusercontent.com/u/55496?v=4)](https://github.com/jaysalvat "jaysalvat (24 commits)")[![mwarkentin](https://avatars.githubusercontent.com/u/67560?v=4)](https://github.com/mwarkentin "mwarkentin (1 commits)")

---

Tags

cssimageconverter

### Embed Badge

![Health badge](/badges/jaysalvat-image2css/health.svg)

```
[![Health](https://phpackages.com/badges/jaysalvat-image2css/health.svg)](https://phpackages.com/packages/jaysalvat-image2css)
```

###  Alternatives

[intervention/image

PHP Image Processing

14.3k203.8M2.5k](/packages/intervention-image)[league/glide

Wonderfully easy on-demand image manipulation library with an HTTP based API.

2.6k52.6M137](/packages/league-glide)[liip/imagine-bundle

This bundle provides an image manipulation abstraction toolkit for Symfony-based projects.

1.7k39.4M238](/packages/liip-imagine-bundle)[spatie/image

Manipulate images with an expressive API

1.4k58.5M175](/packages/spatie-image)[intervention/image-laravel

Laravel Integration of Intervention Image

1558.1M159](/packages/intervention-image-laravel)[intervention/gif

PHP GIF Encoder/Decoder

6025.4M14](/packages/intervention-gif)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
