Reputation: 2903
I would like to know if that's possible to get an image with {% path %} or {% media %} in a twig template from sonata, without crop/resize ? It seems that it's required to specify a format, but I would like to keep the original size in some case.
I have the idea to make a resizer that does nothing for this problem, but is it possible to specify a resizer by context and not a resizer for a provider in all contexts please ? Because I need to use a resizer in some case, but not in all.
Upvotes: 0
Views: 1008
Reputation: 2206
If you want to display your uploaded image without resize / crop in twig you can do :
{% media media, 'reference' %}
More details in the documentation on how to use the twig helpers.
Upvotes: 2