{extends file="parent:frontend/listing/product-box/product-image.tpl"}

/* Todo: $Locale isn't available when called as ajax and therefore the no-picture image fails to load */

{block name='frontend_listing_box_article_image_media'}
    <span class="image--media">
        {$desc = $sArticle.articleName|escape}
        {if isset($sArticle.image.thumbnails)}
            {if $sArticle.image.description}
                {$desc = $sArticle.image.description|escape}
            {/if}
            {block name='frontend_listing_box_article_image_picture_element'}
                <img srcset="{$sArticle.image.thumbnails[0].sourceSet}" alt="{$desc}" title="{$desc|truncate:160}"/>
            {/block}
        {else}
            <img src="{link file="frontend/_public/src/img/no-picture/no-picture_{$sArticle.supplierID}-{$Locale}.svg"}" alt="{$alt}" itemprop="image"/>
        {/if}
    </span>
{/block}
