PHPackages                             rostenkowski/resize - 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. rostenkowski/resize

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

rostenkowski/resize
===================

v4.0(8y ago)3201[2 issues](https://github.com/rostenkowski/resize/issues)PHPPHP &gt;=7.1

Since May 4Pushed 8y ago2 watchersCompare

[ Source](https://github.com/rostenkowski/resize)[ Packagist](https://packagist.org/packages/rostenkowski/resize)[ RSS](/packages/rostenkowski-resize/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (7)Versions (24)Used By (0)

Resize
======

[](#resize)

High Performance Image Processing Component for [Nette Framework](https://nette.org)

[![Build Status](https://camo.githubusercontent.com/b666815291d845d6bd43457fe77e44868674adcff49bacd5c28c55ffc4cd94fd/68747470733a2f2f7472617669732d63692e6f72672f726f7374656e6b6f77736b692f726573697a652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rostenkowski/imagestore)[![Coverage Status](https://camo.githubusercontent.com/232380644ac4afa690f99a5f3b4f3c68f89a8c01929ad7f15796424ab0a0bdc0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f726f7374656e6b6f77736b692f726573697a652f62616467652e737667)](https://coveralls.io/github/rostenkowski/imagestore)[![Code Climate](https://camo.githubusercontent.com/a4af4ee76265a2167c80dfbf63fca5dea5603c2bcdd30c57094c18e6ac2a912b/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f726f7374656e6b6f77736b692f726573697a652f6261646765732f6770612e737667)](https://codeclimate.com/github/rostenkowski/imagestore)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d7679ca754f568746e5dae789477ff1678e3b302509808bf3316610eff307075/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726f7374656e6b6f77736b692f726573697a652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/rostenkowski/resize/?branch=master)

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

[](#installation)

Download the latest [package](https://github.com/rostenkowski/resize/releases) manually or better use the [composer](https://getcomposer.org/doc/00-intro.md#globally)

```
composer require rostenkowski/resize
```

Configuration
-------------

[](#configuration)

The best way is to use the built-in Nette DI container extension in application configuration, usually located in `app/config.neon`. You can place the `imageStore` part of the configuration to your [local configuration](https://github.com/nette/sandbox/tree/master/app/config) file.

```
extensions:
    resize: Rostenkowski\Resize\Extension

resize:
    storageDir: %baseDir%/data/images
    cacheDir:   %baseDir%/www/images
    basePath:   /images/
```

**Manual configuration**

If you aren't using the the DI extension the image macros should be registered to the [Latte](https://latte.nette.org/) engine as described in the docs:

```
nette:
    latte:
        macros:
            - Rostenkowski\Resize\Macro\ImageMacro::install
```

The storage can be created manually in presenter or registered as service this way:

```
services:
    - images: Rostenkowski\ImageStore\ImageStorage("%baseDir%/data/images", "%baseDir%/www/images", "/images/")
```

Requirements
------------

[](#requirements)

- **PHP** Suggested **5.6**, Minimal 5.5
- **Nette** Suggested **2.3**, Minimal 2.2

The library is tested against PHP **5.5**, **5.6** and **7.0** and Nette **2.3** but it should be compatible with previous stable Nette **2.2** and the latest Nette **2.4-dev** as well.

For the full list of dependencies see the [`composer.json`](https://github.com/rostenkowski/resize/blob/master/composer.json) file.

API
---

[](#api)

For the full API documentation navigate to the `docs/api/` directory and open `index.html` file.

### Storage

[](#storage)

```
