Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 6fc2ffd

Browse files
committed
Support imagine runtime config in display url templating helper
1 parent 5090b09 commit 6fc2ffd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

bundles/media/introduction.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,20 @@ The media bundle contains a Twig extension, it contains the following functions:
216216

217217
<img src="<?php echo $view['cmf_media']->displayUrl($image) ?>" alt="" />
218218

219+
If :doc:`LiipImagine <adapters/liip_imagine>` is enabled you can also pass :doc:`filter </bundles/LiipImagineBundle/filters>` and `runtime_config` like below:
220+
221+
.. code-block:: html+jinja
222+
223+
<a href="{{ cmf_media_display_url(file, {
224+
imagine_filter: 'my_filter',
225+
imagine_runtime_config: {
226+
'thumbnail': {'size': [120, 60]}
227+
}
228+
}) }}" title="Download">Download</a>
229+
230+
.. versionadded:: 1.3
231+
Option `imagine_runtime_config` was introduced in MediaBundle 1.3
232+
219233
SonataMediaBundle Integration
220234
-----------------------------
221235

0 commit comments

Comments
 (0)