diff --git a/picture.php b/picture.php index 7cebc101d..afe040c2a 100644 --- a/picture.php +++ b/picture.php @@ -507,6 +507,9 @@ while ($row = pwg_db_fetch_assoc($result)) $row['src_image'] = new SrcImage($row); $row['derivatives'] = DerivativeImage::get_all($row['src_image']); + $extTab = explode('.',$row['path']); + $row['is_svg'] = (strtoupper(end($extTab)) == 'SVG'); + if ($i=='current') { $row['element_path'] = get_element_path($row); diff --git a/themes/default/template/picture_content.tpl b/themes/default/template/picture_content.tpl index c2bbc2e39..3ef5d39af 100644 --- a/themes/default/template/picture_content.tpl +++ b/themes/default/template/picture_content.tpl @@ -4,7 +4,7 @@ {footer_script}var error_icon = "{$ROOT_URL}{$themeconf.icon_dir}/errors_small.png"{/footer_script} {/if} -is_cached()}src="{$current.selected_derivative->get_url()}" {$current.selected_derivative->get_size_htm()}{else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax_loader.gif" data-src="{$current.selected_derivative->get_url()}"{/if} alt="{$ALT_IMG}" id="theMainImage" usemap="#map{$current.selected_derivative->get_type()}" title="{if isset($COMMENT_IMG)}{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{else}{$current.TITLE_ESC} - {$ALT_IMG}{/if}"> +is_cached()}src="{$current.selected_derivative->get_url()}"{$current.selected_derivative->get_size_htm()}{else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax_loader.gif" data-src="{$current.selected_derivative->get_url()}"{/if} alt="{$ALT_IMG}" id="theMainImage" usemap="#map{$current.selected_derivative->get_type()}" title="{if isset($COMMENT_IMG)}{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{else}{$current.TITLE_ESC} FONCTIONNE PTN - {$ALT_IMG}{/if}"> {foreach from=$current.unique_derivatives item=derivative key=derivative_type}{strip}