PHPackages                             thunken/croploadbundle - 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. thunken/croploadbundle

AbandonedArchivedSymfony-bundle

thunken/croploadbundle
======================

Cropload for Symfony, easy steps to add and manage image upload and cropper.

4389PHP

Since Apr 6Pushed 9y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

ThunkenCroploadBundle
=====================

[](#thunkencroploadbundle)

Cropload is a simple Upload and Cropping manager for a single file upload on a form. It gives you all the tools needed to add an upload &amp; crop field to any form in minutes.

Dependencies
============

[](#dependencies)

PHP / Managed by Composer
-------------------------

[](#php--managed-by-composer)

- OneUploaderBundle:
- LiipImagineBundle:

Javascript / Css or Less / You can manage these with Bower
----------------------------------------------------------

[](#javascript--css-or-less--you-can-manage-these-with-bower)

- Jquery:
- Jquery UI:
- Blueimp javascript fileupload:
- Cropper:
- Bootstrap 3, See how to install and use:

Screenshots
===========

[](#screenshots)

Uploading a file with embedded progress bar: [![Uploading a file with embedded progress bar](https://github.com/thunken/CroploadBundle/raw/master/Doc/Images/Screenshots/Screenshot%20from%202017-04-06%2014-52-29.png "Uploading a file with embedded progress bar")](https://github.com/thunken/CroploadBundle/blob/master/Doc/Images/Screenshots/Screenshot%20from%202017-04-06%2014-52-29.png)

Cropping Image with real time preview: [![Cropping Image with real time preview](https://github.com/thunken/CroploadBundle/raw/master/Doc/Images/Screenshots/Screenshot%20from%202017-04-06%2014-51-47.png "Cropping Image with real time preview")](https://github.com/thunken/CroploadBundle/blob/master/Doc/Images/Screenshots/Screenshot%20from%202017-04-06%2014-51-47.png)

Install bundle
==============

[](#install-bundle)

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

[](#installation)

Using composer:

```
composer require thunken/croploadbundle

```

Register the bundle in Symfony
------------------------------

[](#register-the-bundle-in-symfony)

app/AppKernel.php:

```
public function registerBundles()
    {
        $bundles = [
            // ...
            new Thunken\CroploadBundle\ThunkenCroploadBundle(),
    // ...

```

Configure bundle
----------------

[](#configure-bundle)

app/config/config.yml, add these parameters (you can change upload\_web\_dir to your need):

```
parameters:
    root_web_dir: "%kernel.root_dir%/../web"
    upload_web_dir: "media/uploads"
    upload_root_dir: "%root_web_dir%/%upload_web_dir%"

oneup_uploader:
  mappings:
    post: # Your mapping name for a post in this example (call this an endpoint)
      frontend: blueimp # For now, only blueimp is handled
      storage:
        directory: "%upload_root_dir%/post" # Your upload folder for a post
      namer: cropload.date_chunk_namer # Upload namer for a post
    category: # Your mapping name for a category in this example
      frontend: blueimp # For now, only blueimp is handled
      storage:
        directory: "%upload_root_dir%/category"
      namer: cropload.date_chunk_namer # Upload namer for a category

```

Create or modify a form to add your Cropload field
--------------------------------------------------

[](#create-or-modify-a-form-to-add-your-cropload-field)

### Form Type

[](#form-type)

```
