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

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

olicek/nette-webimages
======================

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

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

Since May 6Pushed 9y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (9)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 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

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

4142d 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/1bfabddbe1f9c8018776a699a68127642e183998f54aebc5bbec428e6c16bd10?d=identicon)[Oli](/maintainers/Oli)

---

Top Contributors

[![vojtech-dobes](https://avatars.githubusercontent.com/u/415925?v=4)](https://github.com/vojtech-dobes "vojtech-dobes (27 commits)")[![Olicek](https://avatars.githubusercontent.com/u/2891953?v=4)](https://github.com/Olicek "Olicek (3 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)")

---

Tags

netteroutingimages

### Embed Badge

![Health badge](/badges/olicek-nette-webimages/health.svg)

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

###  Alternatives

[contributte/translation

Symfony/Translation integration for Nette Framework.

771.8M49](/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)
