Normally you would include images with
<img src="{{ asset('location') }}"/>
But if the image doesn't exist, a 404 is thrown and a broken image is shown. How to show another image instead of a broken one? Is there a way to do it in twig?
I'm also using SonataMediaBundle which shows images like so:
{% path media, 'small' %}
Figured there would be a way inside the bundle to check if the image exists, but it doesn't.