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

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

zenside/sonata-image-bundle
===========================

Allow easy support for image upload in sonata forms with preview of current image in onetoone relation

1603[1 issues](https://github.com/ZenSide/SonataImageBundle/issues)PHP

Since Mar 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ZenSide/SonataImageBundle)[ Packagist](https://packagist.org/packages/zenside/sonata-image-bundle)[ RSS](/packages/zenside-sonata-image-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ZenSide Sonata Image Bundle
===========================

[](#zenside-sonata-image-bundle)

Allow to easyly add Image property to an entity to be included in Sonata Forms.

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

[](#installation)

Add bundle with composer

```
composer require zenside/sonata-image-bundle

```

And reference it in AppKernel.php

```
new ZenSide\SonataImageBundle\ZenSideSonataImageBundle(),

```

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

[](#configuration)

After downloaded and add to AppKernel the bundle, update your database to add Image entity

```
php app/console doctrine:schema:update --force

```

Then you can add relations to Image type in your entities

```
class Article {
    /**
     * @ORM\OneToOne(targetEntity="ZenSide\SonataImageBundle\Entity\Image", cascade={"persist"})
     * @ORM\JoinColumn(nullable=true, onDelete="set null")
     */
    private $image;
}

```

If you want to directly use it in a SonataAdmin class, just use the field with type 'sonata\_type\_admin' or 'sonata\_type\_model'

```
$form->add('logo', 'sonata_type_admin');

```

Important : if you use 'sonata\_type\_admin' to directly include input type file in your form, you have to add the following preUpdate and prePersist listeners in your Admin class.

Just copy the following lines in your Admin class :

```
public function prePersist($subject)
{
    ImageAdmin::manageEmbeddedImageAdmins($this, $subject);
}
public function preUpdate($subject)
{
    ImageAdmin::manageEmbeddedImageAdmins($this, $subject);
}

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e9a15f389599ceea51a72ff38fda80d42fc4af0c89f04b280859ad3eafe85296?d=identicon)[janel-nicolas](/maintainers/janel-nicolas)

---

Top Contributors

[![ZenSide](https://avatars.githubusercontent.com/u/8915717?v=4)](https://github.com/ZenSide "ZenSide (12 commits)")[![SimonJanel](https://avatars.githubusercontent.com/u/11664815?v=4)](https://github.com/SimonJanel "SimonJanel (6 commits)")[![QuentinLemCode](https://avatars.githubusercontent.com/u/3814031?v=4)](https://github.com/QuentinLemCode "QuentinLemCode (3 commits)")

### Embed Badge

![Health badge](/badges/zenside-sonata-image-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/zenside-sonata-image-bundle/health.svg)](https://phpackages.com/packages/zenside-sonata-image-bundle)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
