How to get image path in twig using SonataMediaBundle? How to get image path in twig using SonataMediaBundle? symfony symfony

How to get image path in twig using SonataMediaBundle?


There's a documentation for helpers

There are several options. Media helper supports specifying the class

{% media media, 'small' with {'class': 'myclass'} %}

Also you can render just a path with "path" helper:

{% path media, 'small' %}