<div class="col p-1" id="media-{{ photo.id}}" data-type="photo" data-id="{{ photo.id }}">
{% if photo.active %}
{% set filter = 'normal' %}
{% else %}
{% set filter = 'normal_gayscale' %}
{% endif %}
{% if album is defined and album is not empty %}
{% set route = path('portfolio_photo', {slug: profile.slug, media: photo.hash, album: album.id}) %}
{% elseif type is defined and type is not empty %}
{% set route = path('portfolio_photo', {slug: profile.slug, media: photo.hash, type: type}|merge(params)) %}
{% else %}
{% set route = path('portfolio_photo', {slug: profile.slug, media: photo.hash}) %}
{% endif %}
<a href="{{ route }}">
<img src="{{ asset(path) | imagine_filter(filter) }}" class="img-fluid media-shadow">
</a>
</div>