umanit / sonata-media-liip-imagine-bridge-bundle
A bridge between LiipImagineBundle and SonataMediaBundle.
Package info
github.com/umanit/sonata-media-liip-imagine-bridge-bundle
Type:symfony-bundle
pkg:composer/umanit/sonata-media-liip-imagine-bridge-bundle
0.1
2018-10-17 16:01 UTC
Requires
- php: >=7.2
- liip/imagine-bundle: ^2.1
- sonata-project/media-bundle: ^3.16
- symfony/framework-bundle: ^4.1
- symfony/options-resolver: ^4.1
- symfony/yaml: ^4.1
- twig/twig: ^2.5
This package is auto-updated.
Last update: 2026-03-13 03:00:58 UTC
README
This bundle is a bridge to use LiipImagineBundle with SonataMediaBundle.
Installation
composer req umanit/sonata-media-liip-imagine-bridge-bundle
Usage
Two twig filters are provided:
image
Use it to display a full img tag.
{{ object.media|image({width: 350, height: 200, alt: object.title, class: 'my-fancy-class'}, 'outbound') }}
You must at least provide the options width and height.
media_path
Use this one to only display the path of an image.
<img src="{{ object.media_path|image(350, 200, 'outbound' }}">