29 jours
29 jours
29 jours
29 jours
29 jours
29 jours
29 jours
29 jours
29 jours
29 jours
c'est pas possible, l'extension webp remplace l'originale QUE si "activer le webp" est sur oui
CODE if(!$this->isCached('blockbanner.tpl', $this->getCacheId())) {
$imgname = Configuration::get('BLOCKBANNER_IMG', $this->context->language->id);
if($imgname
&& file_exists(_PS_MODULE_DIR_.$this->name.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.$imgname)
) {
$size = getimagesize(_PS_MODULE_DIR_.$this->name.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.$imgname);
if(Configuration::getGlobalValue('PS_USE_WEBP')) {
$imgname = str_replace(['.jpg', '.png', '.gif'], '.webp', $imgname);
}
$this->smarty->assign(array(
'banner_img' => $this->context->link->protocol_link.Tools::getMediaServer($imgname).$this->_path.'images/'.$imgname.'?v='.
filemtime(_PS_MODULE_DIR_.$this->name.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.$imgname),
'size' => $size
));
}
$this->smarty->assign(array(
'banner_link' => Configuration::get('BLOCKBANNER_LINK', $this->context->language->id),
'banner_desc' => Configuration::get('BLOCKBANNER_DESC', $this->context->language->id)
));
}
29 jours
29 jours