PHPackages                             the-sound-of-tnt/nette-webimages - 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. the-sound-of-tnt/nette-webimages

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

the-sound-of-tnt/nette-webimages
================================

On-the-fly generated web images for your Nette app

2.0.0(11y ago)012BSD-3-ClausePHPPHP &gt;=5.4

Since May 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/TheSoundOfTNT/nette-webimages)[ Packagist](https://packagist.org/packages/the-sound-of-tnt/nette-webimages)[ RSS](/packages/the-sound-of-tnt-nette-webimages/feed)WikiDiscussions master Synced yesterday

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

#### Requirements

[](#requirements)

- PHP 5.4+
- [nette/application](https://github.com/nette/application) &gt;= 2.2
- [nette/di](https://github.com/nette/di) &gt;= 2.2
- [nette/http](https://github.com/nette/http) &gt;= 2.2
- [latte/latte](https://github.com/nette/latte) &gt;= 2.2
- [nette/utils](https://github.com/nette/utils) &gt;= 2.2

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

[](#installation)

1. Copy source codes from Github or using [Composer](http://getcomposer.org/):

```
$ composer require dotblue/nette-webimages
```

2. Register as Configurator's extension:

```
extensions:
	webimages: DotBlue\WebImages\Extension

```

Concept
-------

[](#concept)

This addon gives you power to automatically generate different sized versions of images throughout your app. When browser will request new version of image, application will generate it and save it to its requested destination, so that in next HTTP request, your server will just serve existing file.

To enable this, modify your `.htaccess`:

```
# front controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(pdf|js|ico|gif|css|rar|zip|tar\.gz)$ index.php [L]

```

Usage
-----

[](#usage)

First, you have to define your `DotBlue\WebImages\IProvider` implementation. Its responsibility is to generate new version of image using `Nette\Image`. Check [examples](examples) for inspiration - the only required method `getImage` should return `Nette\Image` instance of queried image.

When you have it, register it in configuration:

```
webimages:
	providers:
		-

```

Secondly you have to specify route where your images will be available. Central point of the route is `id` parameter, which should uniquely identify your image. Lets setup simple route:

```
webimages:
	routes:
		- images/-x.jpg

```

> By default all these routes will be prepended before your other routes - assuming you use `Nette\Application\Routers\RouteList` as your root router. You can disable this by setting `prependRoutesToRouter: false`. Then it's your responsibility to plug webimages router (service `webimages.router`) to your routing implementation.

Addon gives you new macro `n:src`. Now you're ready to use it.

```

```

This will result in following HTML:

```

```

Creation of this file will handle your implementation of `DotBlue\WebImages\IProvider`.

### HTTPS

[](#https)

To toggle secured route flag use following syntax in your configuration:

```
webimages:
    routes:
        - mask: images/-x.jpg
          secured: true

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 79.4% 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 ~74 days

Total

5

Last Release

4094d ago

Major Versions

0.9.0 → 1.0.02014-05-11

1.0.2 → 2.0.02015-02-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/d5249725765f5897ac6a63951d8d266676f406b5b08156a378fe5a5e5b0d763b?d=identicon)[TheSoundOfTNT](/maintainers/TheSoundOfTNT)

---

Top Contributors

[![vojtech-dobes](https://avatars.githubusercontent.com/u/415925?v=4)](https://github.com/vojtech-dobes "vojtech-dobes (27 commits)")[![vysinsky](https://avatars.githubusercontent.com/u/3693578?v=4)](https://github.com/vysinsky "vysinsky (3 commits)")[![TheSoundOfTNT](https://avatars.githubusercontent.com/u/9889004?v=4)](https://github.com/TheSoundOfTNT "TheSoundOfTNT (2 commits)")[![greeny](https://avatars.githubusercontent.com/u/3734204?v=4)](https://github.com/greeny "greeny (1 commits)")[![Olicek](https://avatars.githubusercontent.com/u/2891953?v=4)](https://github.com/Olicek "Olicek (1 commits)")

---

Tags

netteroutingimages

### Embed Badge

![Health badge](/badges/the-sound-of-tnt-nette-webimages/health.svg)

```
[![Health](https://phpackages.com/badges/the-sound-of-tnt-nette-webimages/health.svg)](https://phpackages.com/packages/the-sound-of-tnt-nette-webimages)
```

###  Alternatives

[dotblue/nette-webimages

On-the-fly generated web images for your Nette app

262.1k](/packages/dotblue-nette-webimages)[brabijan/images

Image storage for Nette Framework

5617.7k](/packages/brabijan-images)[tomaj/nette-api

Nette api

36261.8k4](/packages/tomaj-nette-api)[pavlista/nette-palette

Palette support for Nette Framework and Latte template engine

1657.4k](/packages/pavlista-nette-palette)[kollarovic/thumbnail

Generating image thumbnails

1035.5k2](/packages/kollarovic-thumbnail)

PHPackages © 2026

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