PHPackages                             kadokweb/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. kadokweb/cropper

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

kadokweb/cropper
================

It is a easy and simple PHP image cropper and cache thumb manager

1.0.0(4y ago)05MITPHPPHP &gt;=7.2

Since Jan 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/kadokweb/cropper)[ Packagist](https://packagist.org/packages/kadokweb/cropper)[ Docs](http://www.kadok.com.br)[ RSS](/packages/kadokweb-cropper/feed)WikiDiscussions master Synced 1mo ago

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

Cropper @KadokWeb
=================

[](#cropper-kadokweb)

[![Maintainer](https://camo.githubusercontent.com/a4dcbb59925d08d95a5aab17a50fd550c5c211e809e5e3616808aa48a1747ebc/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6d61696e7461696e65722d406b61646f6b7765622d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/kadokweb)[![Source Code](https://camo.githubusercontent.com/3a3b0b8aaff36e7fe22ee2511075a4e90b08cc871811beb6a6ae80cde168ad56/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d6b61646f6b7765622f63726f707065722d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/kadokweb/cropper)[![PHP from Packagist](https://camo.githubusercontent.com/fb6a632d1287f5aed2255865933120eb005ffa4fd197e97b4a8ef4417fbd762c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6b61646f6b7765622f63726f707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kadokweb/cropper)[![Latest Version](https://camo.githubusercontent.com/d79e408edf90d2062c6c412bd9b6038c00d0ab80727885ada07da3c6980a75db/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6b61646f6b7765622f63726f707065722e7376673f7374796c653d666c61742d737175617265)](https://github.com/kadokweb/cropper/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build](https://camo.githubusercontent.com/84d16ce6b957732f3531062b975f20229f801169612ed17125afd9e38561d280/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f6b61646f6b7765622f63726f707065722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/kadokweb/cropper)[![Quality Score](https://camo.githubusercontent.com/8964f913f2280f1f17e516146263be1f3c021c698b1c00032ce2ec93eee9e722/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6b61646f6b7765622f63726f707065722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/kadokweb/cropper)[![Total Downloads](https://camo.githubusercontent.com/d699728184b49771e1b47fbf1821a7d87622a75901831893aaeab5832364025c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b61646f6b7765622f63726f707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kadokweb/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 KadokWeb
--------------

[](#about-kadokweb)

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

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

KadokWeb é um conjunto de pequenos e otimizados componentes PHP para tarefas comuns. Mantido por Doka Silva e a equipe UpInside. 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:

```
"kadokweb/cropper": "1.0.*"
```

or run

```
composer require kadokweb/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. KadokWeb 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-kadokweb-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. KadokWeb Cropper funciona assim:

#### Create thumbnails

[](#create-thumbnails)

```
