{% load l10n static cascade_tags thumbnail %}
{% localize off %}{% spaceless %}{% with css_classes=instance.css_classes inline_styles=instance.inline_styles %}
<img {{ instance.html_tag_attributes }}{% if css_classes %} class="{{ css_classes }}"{% endif %}{% if inline_styles %} style="{{ inline_styles }}"{% endif %}
{% if instance.image|is_valid_image %}
	{% if sizes %} sizes="{{ sizes|join:', ' }}"{% endif %}
	srcset="{% for key, srcset in srcsets.items %}
		{% thumbnail instance.image srcset.size crop=srcset.crop upscale=srcset.upscale subject_location=srcset.subject_location as thumb %}{{ thumb.url }} {{ key }}{% if not forloop.last %},{% endif %}
	{% endfor %}"
	{% thumbnail instance.image src.size crop=src.crop upscale=src.upscale subject_location=src.subject_location as thumb %}
	src="{{ thumb.url }}"{% if not sizes %} width="{{ thumb.width }}" height="{{ thumb.height }}"{% endif %}
{% else %}
	src="{% static 'cascade/fallback.svg' %}"
{% endif %}
/>
{% endwith %}{% endspaceless %}{% endlocalize %}
