PHPackages                             polon/cropper - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. polon/cropper

ActiveLibrary[File &amp; Storage](/categories/file-storage)

polon/cropper
=============

This is an easy and simple PHP image resizer with thumbnail cache management.

v1.0.0(3y ago)081MITPHPPHP &gt;=7.2

Since Apr 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/polondigital/cropper)[ Packagist](https://packagist.org/packages/polon/cropper)[ Docs](https://www.polon.digital)[ RSS](/packages/polon-cropper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Cropper @Polon
==============

[](#cropper-polon)

[![Maintainer](https://camo.githubusercontent.com/51629c43d40c4aac75a193c66a783456dfd2a2d417bf28aa016e7df80dd7b29c/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6d61696e7461696e65722d40706f6c6f6e6469676974616c2d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/polondigital)[![Source Code](https://camo.githubusercontent.com/58a1929688434f44da6df3dce3d64172fd36afa6e0e7a384cc24cbf7fd39be51/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d706f6c6f6e2f63726f707065722d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/polondigital/cropper)[![PHP from Packagist](https://camo.githubusercontent.com/ec5c570a1a8e187b591855ce16b6b280d7377b118b62f16daa3bbc906bc718ef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f706f6c6f6e2f63726f707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/polon/cropper)[![Latest Version](https://camo.githubusercontent.com/3d6f95c350d473c98d90a95c80535e3487a94f43b4a635e7bf9aeaa9c5fd0bec/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f706f6c6f6e6469676974616c2f63726f707065722e7376673f7374796c653d666c61742d737175617265)](https://github.com/polondigital/cropper/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build](https://camo.githubusercontent.com/01a67e7ae2a057b208c35986a03ff0431c02dc9a372f68acee0f2de5c1b39ffe/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f706f6c6f6e6469676974616c2f63726f707065722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/polondigital/cropper)[![Quality Score](https://camo.githubusercontent.com/2d3f8fc1e43ab6be77c010dd51c5f068798dc39327f6ab89be312d1b7ef80f83/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f706f6c6f6e6469676974616c2f63726f707065722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/polondigital/cropper)[![Total Downloads](https://camo.githubusercontent.com/85b238b3435316cdf254219b7e6207cfcf65b377a67fcb5319d782f1c38f96a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706f6c6f6e2f63726f707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/polon/cropper)

###### Cropper is a component that simplifies the creation of JPG and PNG image thumbnails with a cache engine. Cropper CC creates your image for each part required in the application with zero complexity.

[](#cropper-is-a-component-that-simplifies-the-creation-of-jpg-and-png-image-thumbnails-with-a-cache-engine-cropper-cc-creates-your-image-for-each-part-required-in-the-application-with-zero-complexity)

Cropper é um componente que simplifica a criação de miniaturas de imagens JPG e PNG com um motor de cache. O Cropper CC cria versões de suas imagens para cada dimensão necessária na aplicação com zero de complexidade.

\####WEBP THUMBNAILS:

Published in version 1.3.\* by default how thumbnails are converted to webP.

Adicionado na versão 1.3.\* por padrão as miniaturas são convertidas para webP.

About Polon
-----------

[](#about-polon)

###### Polon is a set of small and optimized PHP components for common tasks. Held by Victor and the Polon team. With them you perform routine tasks with fewer lines, writing less and doing much more.

[](#polon-is-a-set-of-small-and-optimized-php-components-for-common-tasks-held-by-victor-and-the-polon-team-with-them-you-perform-routine-tasks-with-fewer-lines-writing-less-and-doing-much-more)

Polon é um conjunto de pequenos e otimizados componentes PHP para tarefas comuns. Mantido por Victor e a equipe Polon. Com eles você executa tarefas rotineiras com poucas linhas, escrevendo menos e fazendo muito mais.

### Highlights

[](#highlights)

- Simple Thumbnail Creator (Simples criador de miniaturas)
- Cache optimization per dimension (Otimização em cache por dimensão)
- Media Control by Filename (Contrôle de mídias por nome do arquivo)
- Cache cleanup by filename and total (Limpeza de cache por nome de arquivo e total)
- Composer ready and PSR-2 compliant (Pronto para o composer e compatível com PSR-2)

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

[](#installation)

Cropper is available via Composer:

```
"polon/cropper": "1.3.*"
```

or run

```
composer require polon/cropper
```

Documentation
-------------

[](#documentation)

###### They are just two methods to do all the work. You just need to call ***make*** to create or use thumbnails of any size, or ***flush*** to free the cache of a file or the entire folder. Polon Cropper works like this:

[](#they-are-just-two-methods-to-do-all-the-work-you-just-need-to-call-make-to-create-or-use-thumbnails-of-any-size-or-flush-to-free-the-cache-of-a-file-or-the-entire-folder-polon-cropper-works-like-this)

São apenas dois métodos para fazer todo o trabalho. Você só precisa chamar o ***make*** para criar ou usar miniaturas de qualquer tamanho, ou o ***flush*** para liberar o cache de um arquivo ou da pasta toda. Polon Cropper funciona assim:

#### Create thumbnails

[](#create-thumbnails)

```
