{% spaceless %} {% load i18n %} {% load imagekit %} {% if book.cover %} {% with external_path|yesno:',/images/' as image_path %} {% if size_mobile == 'xsmall' %} {% generateimage 'bw:book:xsmall:webp' source=book.cover as th_xsmall_webp %} {% generateimage 'bw:book:xsmall:jpg' source=book.cover as th_xsmall_jpg %} {% elif size_mobile == 'small' %} {% generateimage 'bw:book:small:webp' source=book.cover as th_small_webp %} {% generateimage 'bw:book:small:jpg' source=book.cover as th_small_jpg %} {% elif size_mobile == 'medium' %} {% generateimage 'bw:book:medium:webp' source=book.cover as th_medium_webp %} {% generateimage 'bw:book:medium:jpg' source=book.cover as th_medium_jpg %} {% elif size_mobile == 'large' %} {% generateimage 'bw:book:large:webp' source=book.cover as th_large_webp %} {% generateimage 'bw:book:large:jpg' source=book.cover as th_large_jpg %} {% elif size_mobile == 'xlarge' %} {% generateimage 'bw:book:xlarge:webp' source=book.cover as th_xlarge_webp %} {% generateimage 'bw:book:xlarge:jpg' source=book.cover as th_xlarge_jpg %} {% elif size_mobile == 'xxlarge' %} {% generateimage 'bw:book:xxlarge:webp' source=book.cover as th_xxlarge_webp %} {% generateimage 'bw:book:xxlarge:jpg' source=book.cover as th_xxlarge_jpg %} {% endif %} {% if size == 'xsmall' %} {% generateimage 'bw:book:xsmall:webp' source=book.cover as th_xsmall_webp %} {% generateimage 'bw:book:xsmall:jpg' source=book.cover as th_xsmall_jpg %} {% elif size == 'small' %} {% generateimage 'bw:book:small:webp' source=book.cover as th_small_webp %} {% generateimage 'bw:book:small:jpg' source=book.cover as th_small_jpg %} {% elif size == 'medium' %} {% generateimage 'bw:book:medium:webp' source=book.cover as th_medium_webp %} {% generateimage 'bw:book:medium:jpg' source=book.cover as th_medium_jpg %} {% elif size == 'large' %} {% generateimage 'bw:book:large:webp' source=book.cover as th_large_webp %} {% generateimage 'bw:book:large:jpg' source=book.cover as th_large_jpg %} {% elif size == 'xlarge' %} {% generateimage 'bw:book:xlarge:webp' source=book.cover as th_xlarge_webp %} {% generateimage 'bw:book:xlarge:jpg' source=book.cover as th_xlarge_jpg %} {% elif size == 'xxlarge' %} {% generateimage 'bw:book:xxlarge:webp' source=book.cover as th_xxlarge_webp %} {% generateimage 'bw:book:xxlarge:jpg' source=book.cover as th_xxlarge_jpg %} {% endif %} {% endwith %} {% endif %} {% if not book.cover and book.alt_text %} {{ book.alt_text }} {% endif %} {% endspaceless %}
{{ book.alt_text }}