umanit/sonata-media-liip-imagine-bridge-bundle

A bridge between LiipImagineBundle and SonataMediaBundle.

Maintainers

Package info

github.com/umanit/sonata-media-liip-imagine-bridge-bundle

Homepage

Type:symfony-bundle

pkg:composer/umanit/sonata-media-liip-imagine-bridge-bundle

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1 2018-10-17 16:01 UTC

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' }}">