PHPackages                             nfq-alpha/sprite-bundle - 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. [Templating &amp; Views](/categories/templating)
4. /
5. nfq-alpha/sprite-bundle

ActiveLibrary[Templating &amp; Views](/categories/templating)

nfq-alpha/sprite-bundle
=======================

Generate sprites with PHP and twig templates

1.0.2(11y ago)138.9k↓50%6[3 PRs](https://github.com/nfq-alpha/sprite-generator/pulls)MITPHPPHP &gt;=5.3.0

Since Sep 12Pushed 6y agoCompare

[ Source](https://github.com/nfq-alpha/sprite-generator)[ Packagist](https://packagist.org/packages/nfq-alpha/sprite-bundle)[ RSS](/packages/nfq-alpha-sprite-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Nfq Sprite Generator Bundle
===========================

[](#nfq-sprite-generator-bundle)

Generate sprite images and stylesheets with plain PHP and GD2 (no 3rd party dependencies)

Installation
------------

[](#installation)

### Dependancies

[](#dependancies)

PHP extension GD2

### Get the bundle

[](#get-the-bundle)

Add this in your composer.json

```
{
	"require": {
		"nfq-alpha/sprite-bundle": "dev-master@dev"
	}
}
```

and then run

```
php composer.phar update
```

### Add the classes to your Kernel

[](#add-the-classes-to-your-kernel)

```
new SpriteGenerator\SpriteGeneratorBundle(),
```

### Configuration

[](#configuration)

You have to configure your sprites by adding lines to `config.yml`:

```
sprite_generator:
    sprites:
        spritename:
            inDir: %kernel.root_dir%/../src/Resources/public/img/sprites/
            outImage: %kernel.root_dir%/../src/Resources/public/img/sprite2.png
            outCss: %kernel.root_dir%/../src/Resources/public/scss/_sprites2.scss
            relativeImagePath: ../bundles/img/
            padding: 5
            spriteClass: sprite
            cssFormat: sass
            imagePositioning: one-column
            imageGenerator: gd2
        another_spritename:
            inDir: %kernel.root_dir%/../src/Resources/public/img/sprites/
            outImage: %kernel.root_dir%/../src/Resources/public/img/sprite2.png
            outCss: %kernel.root_dir%/../src/Resources/public/scss/_sprites2.scss
            relativeImagePath: ../bundles/img/
            padding: 5
            spriteClass: sprite_another
            cssFormat: sass
            imagePositioning: one-column
            imageGenerator: gd2
```

Generate sprites
----------------

[](#generate-sprites)

Generate all your sprites :

```
$ php app/console nfq:sprite:generate
```

Generate one sprite :

```
$ php app/console nfq:sprite:generate spritename
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 89.3% 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

4254d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8734809?v=4)[NFQ Alpha](/maintainers/nfq-alpha)[@nfq-alpha](https://github.com/nfq-alpha)

---

Top Contributors

[![thermomixrecipes](https://avatars.githubusercontent.com/u/6606249?v=4)](https://github.com/thermomixrecipes "thermomixrecipes (25 commits)")[![alpha-nfq](https://avatars.githubusercontent.com/u/10057765?v=4)](https://github.com/alpha-nfq "alpha-nfq (2 commits)")[![kazimierasbutkus](https://avatars.githubusercontent.com/u/8746381?v=4)](https://github.com/kazimierasbutkus "kazimierasbutkus (1 commits)")

---

Tags

sprite

### Embed Badge

![Health badge](/badges/nfq-alpha-sprite-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/nfq-alpha-sprite-bundle/health.svg)](https://phpackages.com/packages/nfq-alpha-sprite-bundle)
```

###  Alternatives

[twig/extra-bundle

A Symfony bundle for extra Twig extensions

91292.0M312](/packages/twig-extra-bundle)[twig/intl-extra

A Twig extension for Intl

36663.2M218](/packages/twig-intl-extra)[rcrowe/twigbridge

Adds the power of Twig to Laravel

9105.9M50](/packages/rcrowe-twigbridge)[twig/string-extra

A Twig extension for Symfony String

21946.0M132](/packages/twig-string-extra)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

23018.5M53](/packages/twig-cssinliner-extra)[symfony/ux-twig-component

Twig components for Symfony

21814.8M160](/packages/symfony-ux-twig-component)

PHPackages © 2026

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