PHPackages                             darkling/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. darkling/nette-webimages

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

darkling/nette-webimages
========================

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

2.2(5y ago)070BSD-3-ClausePHPPHP &gt;=7.2

Since May 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Daaarkling/nette-webimages)[ Packagist](https://packagist.org/packages/darkling/nette-webimages)[ RSS](/packages/darkling-nette-webimages/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (5)Versions (12)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

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 65.9% 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 ~260 days

Recently: every ~384 days

Total

10

Last Release

2098d ago

Major Versions

0.9.0 → 1.0.02014-05-11

1.0.2 → 2.0.02015-02-25

PHP version history (2 changes)0.9.0PHP &gt;=5.4

2.2PHP &gt;=7.2

### Community

Maintainers

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

---

Top Contributors

[![vojtech-dobes](https://avatars.githubusercontent.com/u/415925?v=4)](https://github.com/vojtech-dobes "vojtech-dobes (27 commits)")[![Daaarkling](https://avatars.githubusercontent.com/u/10207494?v=4)](https://github.com/Daaarkling "Daaarkling (9 commits)")[![vysinsky](https://avatars.githubusercontent.com/u/3693578?v=4)](https://github.com/vysinsky "vysinsky (3 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/darkling-nette-webimages/health.svg)

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

###  Alternatives

[contributte/translation

Symfony/Translation integration for Nette Framework.

771.8M50](/packages/contributte-translation)[dotblue/nette-webimages

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

262.1k](/packages/dotblue-nette-webimages)[ublaboo/datagrid

DataGrid for Nette Framework: filtering, sorting, pagination, tree view, table view, translator, etc

2972.0M24](/packages/ublaboo-datagrid)[brabijan/images

Image storage for Nette Framework

5617.7k](/packages/brabijan-images)[pavlista/nette-palette

Palette support for Nette Framework and Latte template engine

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

Generating image thumbnails

1036.1k2](/packages/kollarovic-thumbnail)

PHPackages © 2026

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