PHPackages                             aropixel/sylius-admin-media-plugin - 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. [Admin Panels](/categories/admin)
4. /
5. aropixel/sylius-admin-media-plugin

ActiveSylius-plugin[Admin Panels](/categories/admin)

aropixel/sylius-admin-media-plugin
==================================

Enhanced sylius admin media management with image cropping, library...

v0.2.4(5y ago)31154[2 issues](https://github.com/aropixel/sylius-admin-media-plugin/issues)MITPHPPHP ^7.3CI failing

Since Jun 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/aropixel/sylius-admin-media-plugin)[ Packagist](https://packagist.org/packages/aropixel/sylius-admin-media-plugin)[ RSS](/packages/aropixel-sylius-admin-media-plugin/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (25)Versions (15)Used By (0)

 [ ![Aropixel logo](https://avatars1.githubusercontent.com/u/14820816?s=200&v=4) ](http://www.aropixel.com/)

Sylius Admin Media Plugin
=========================

[](#sylius-admin-media-plugin)

### Enhanced sylius admin media management with image cropping, library (based on Artgris Media Bundle)

[](#enhanced-sylius-admin-media-management-with-image-cropping-library-based-on-artgris-media-bundle)

Table of contents
-----------------

[](#table-of-contents)

- [Presentation](#presentation)
- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

Presentation
------------

[](#presentation)

Once the plugin is installed and configured, the sylius image system for the ressource (product etc) will be replaced by complete media management system. You'll be able to:

- upload image (of course)
- open a file manager in order to retrieve all the image uploaded, and select one of them
- crop freely the image directly in the admin before saving it
- select a format that will force you to crop the image with a certain ratio)

This plugin is heavily based on the artgris media bundle and file manager.

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

[](#installation)

In a sylius application :

- Install the plugin : `composer require aropixel/sylius-admin-media-plugin`

If the plugin is not registered in the config/bundles.php file, register it by adding "Aropixel\\SyliusAdminMediaPlugin\\AropixelSyliusAdminMediaPlugin::class =&gt; \['all' =&gt; true\],"

- Create a aropixel\_sylius\_admin\_media.yaml in the config folder and import the plugin configuration:

```
imports:
    - { resource: "@AropixelSyliusAdminMediaPlugin/Resources/config/app/config.yml" }

```

- Create a aropixel\_sylius\_admin\_media.yaml in the config/routes folder and import the plugin routes:

```
aropixel_sylius_admin_media:
    resource: '@AropixelSyliusAdminMediaPlugin/Resources/config/routes.xml'

```

- In the bundles.php file, register the new plugins:

```
Artgris\Bundle\FileManagerBundle\ArtgrisFileManagerBundle::class => ['all' => true],
Gregwar\ImageBundle\GregwarImageBundle::class => ['all' => true],
Artgris\Bundle\MediaBundle\ArtgrisMediaBundle::class => ['all' => true],
Aropixel\SyliusAdminMediaPlugin\AropixelSyliusAdminMediaPlugin::class => ['all' => true],

```

- Create the 'uploads' folder in the 'public' folder
- install the assets:

`php bin/console assets:install`

Usage
-----

[](#usage)

For each ressource, you can define crops format (ratio) that you want to use for cropping the image in admin. Each crop definied is linked to a liip filter so that the ratio of the crop is automatically calculated based on the liip filter size.

For example, imagine you have a blog system in your sylius app and you want to display each blog post in the home with a thumbnail. You have two sylius ressource: Post Entity and a PostImage entity.

- First you need to create the admin form for your Post entity, and also the admin form for your PostImage entity. The entity form will add the AdminMediaCollectionType for the images:

```
->add('images', AdminMediaCollectionType::class, [
                'entry_type' => PostImageType::class,
                'allow_add' => true,
                'allow_delete' => true,
                'by_reference' => false,
                'label' => 'Images'
            ])

```

- The PostImage form will need to extend the ImageType defined by the plugin, example;

```
use App\Entity\Producer\ProducerImage;
use Aropixel\SyliusAdminMediaBundle\Form\Type\ImageType;
use Symfony\Component\OptionsResolver\OptionsResolver;

final class PostImageType extends ImageType
{

    public function configureOptions(OptionsResolver $resolver): void
    {
        $resolver->setDefaults(array(
            'data_class' => PostImage::class,
        ));
    }

    public function getBlockPrefix(): string
    {
        return 'app_post_image';
    }
}

```

- Then register the image form in the services.yaml:

```
    app.form.type.post_image:
        class: App\Form\Type\PostImageType
        tags:
            - { name: form.type }
        arguments: [ '@aropixel_sylius_admin_media.image_crop.crop_ratio_manager', '%app.model.post_image.class%']

```

- In a classic sylius application, you generally use liip filters in order to generate, in front the thumbnail of your image blog post, example:

```
liip_imagine:
    resolvers:
        default:
            web_path:
                web_root: "%kernel.project_dir%/public"
                cache_prefix: "media/cache"

    filter_sets:
        home_news:
            quality: 75
            filters:
                strip: ~
                thumbnail:
                    size: [600, 400]
                    mode: outbound
                    allow_upscale: true

```

- When the admin upload the image for the blog post, with this plugin, he can choose a defined format in order to be able to crop the image at the correct ratio, before saving it, so that the image is perfectly suited for the thumbnail! Here is the configuration of the plugin if you want to let the admin crop the image using the home\_news liip filter size:

```
aropixel_sylius_admin_media:

   entities_crops:
       #first you have to define the image entity in which you want to use the crop system
       App\Entity\Producer\ProducerImage:
           # you use the the liip filter id and define a name that will be displayed for selecting this crop
           home_news: "Home news"

```

You can also add default crop format, available for all images:

```
aropixel_sylius_admin_media:

   entities_crops:
       ...
   default_crops:
       main: "Default"

```

And that's it! You can now in the admin choose a format and crop it with a specfic ratio so that it's perfectly suited for your page!

License
-------

[](#license)

Aropixel Blog Bundle is under the [MIT License](LICENSE)

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.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.

###  Release Activity

Cadence

Every ~4 days

Total

12

Last Release

2157d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4610384?v=4)[Joël Gomez Caballe](/maintainers/kbyjoel)[@kbyjoel](https://github.com/kbyjoel)

---

Top Contributors

[![davidroberto](https://avatars.githubusercontent.com/u/12612695?v=4)](https://github.com/davidroberto "davidroberto (37 commits)")[![qdevos](https://avatars.githubusercontent.com/u/50320421?v=4)](https://github.com/qdevos "qdevos (4 commits)")[![twin-elements](https://avatars.githubusercontent.com/u/17727266?v=4)](https://github.com/twin-elements "twin-elements (1 commits)")

---

Tags

syliussylius-plugin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aropixel-sylius-admin-media-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/aropixel-sylius-admin-media-plugin/health.svg)](https://phpackages.com/packages/aropixel-sylius-admin-media-plugin)
```

###  Alternatives

[monsieurbiz/sylius-settings-plugin

Add a settings panel to your Sylius.

27210.3k9](/packages/monsieurbiz-sylius-settings-plugin)[sylius/refund-plugin

Plugin provides basic refunds functionality for Sylius application.

701.8M20](/packages/sylius-refund-plugin)[sylius/invoicing-plugin

Invoicing plugin for Sylius.

891.1M2](/packages/sylius-invoicing-plugin)[sylius/paypal-plugin

PayPal plugin for Sylius.

461.5M7](/packages/sylius-paypal-plugin)[monsieurbiz/sylius-homepage-plugin

Add a homepage management to your Sylius using the Rich Editor.

1470.7k1](/packages/monsieurbiz-sylius-homepage-plugin)[monsieurbiz/sylius-media-manager-plugin

Add a media manager to your Sylius.

1796.2k5](/packages/monsieurbiz-sylius-media-manager-plugin)

PHPackages © 2026

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