{% load styling_tags wagtailimages_tags wagtailcore_tags %} {% spaceless %} {% if self.page_url or self.external_url %} {% endif %} {# styling is the same for every kind of image #} {% get_styling_classes self.styling as classes %} {# Unfortunately we can't use picture with preserver-svg because we've got some extra attributes to be aaded to the tag #} {% if self.image.is_svg %} {% image self.image original as original %} {{ original.alt }} {% else %} {% picture self.image format-{webp,jpeg} scale-{100,50,30} as renditions %} {% if self.lazy %} {% else %} {{ self.alt|default:renditions.formats.jpeg.0.alt }} {% endif %} {% endif %} {% if self.page_url or self.external_url %} {% endif %} {% endspaceless %}