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

A bridge between LiipImagineBundle and SonataMediaBundle.

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 4

Forks: 0

Open Issues: 0

Type:symfony-bundle

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

0.1 2018-10-17 16:01 UTC

This package is auto-updated.

Last update: 2025-09-13 02:02:09 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' }}">