PHPackages                             avro/image-bundle - 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. avro/image-bundle

ActiveSymfony-bundle[Image &amp; Media](/categories/media)

avro/image-bundle
=================

Symfony2 image Bundle

024PHP

Since Jan 7Pushed 13y ago1 watchersCompare

[ Source](https://github.com/jdewit/AvroImageBundle)[ Packagist](https://packagist.org/packages/avro/image-bundle)[ RSS](/packages/avro-image-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

AvroImageBundle
---------------

[](#avroimagebundle)

Symfony2 Image Bundle.

Easily attach images to any object and display them as a gallery, carousel, or lightbox.

Status
------

[](#status)

- A work in progress
- Currently only works with MongoDB and stores images in GridFS

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

[](#requirements)

- [LiipImagineBundle](http://github.com/liip/ImagineBundle)
- [DoctrineMongodbBundle](https://github.com/doctrine/DoctrineMongoDBBundle)

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

[](#installation)

### Download AvroImageBundle using composer

[](#download-avroimagebundle-using-composer)

Add AvroImageBundle in your composer.json:

```
{
    "require": {
        "avro/image-bundle": "*"
    }
}
```

Now tell composer to download the bundle by running the command:

```
$ php composer.phar update avro/image-bundle
```

### Enable the bundle in the kernel:

[](#enable-the-bundle-in-the-kernel)

```
// app/AppKernel.php
new Avro\ImageBundle\AvroImageBundle
```

### Add Routing

[](#add-routing)

//app/config/routing

```
avro_image:
    resource: "@AvroImageBundle/Resources/config/routing/routing.xml"
```

### Add Resources

[](#add-resources)

Add CSS

```
{% stylesheets output='css/compiled/app.css' filter='cssrewrite, less, ?yui_css'
...
    'bundles/avroimage/css/avro-image.css'
...
%}

{% endstylesheets %}
```

Add JS

```
{% javascripts output='js/compiled/app.js' filter='?yui_js'
...
    'bundles/avroimage/js/avro-image.js'
...
%}

{% endjavascripts %}
```

Dump your assets and watch

```
$ php app/console assets:install --symlink=true

$ php app/console assetic:dump --watch --force
```

Add Mapping
-----------

[](#add-mapping)

Add the image reference to the object you want to rate

```
