how do smarty check file_exists ?
My version does not find the picture:
{foreach from=$item.item_img key=id item=i} {if file_exists("{$host}/item_images/$i")} <div class="item-small-image{if $id==0} selected{/if}" style="background-image: url({$host}/item_images/{$i});" data-name="{$i}"> </div> {else} <div class="item-small-no-image"> <img src="{$host}/images/no_image.jpg"/> </div> {/if} {/foreach}
$hostcontains the path relative to the site root, and the absolute path in the file system is required forfile_exists. - teranfile_exists, where the path is relative to the site to some $ path, where the path is relative to the image directory in the file system, so that it is:/var/www/site.ru/images/- lampa