This commit is contained in:
2021-10-08 16:32:44 +03:00
parent cf1405bef6
commit 20f49c1572
5 changed files with 17 additions and 8 deletions
+2 -1
View File
@@ -1,11 +1,12 @@
<?
use \Wt\Core\Media\Webp;
use \Wt\Core\Templater\Tools as TemplaterTools;
?>
<picture class="kit-picture <?=$arParams['CLASS']?>">
<?
$webp = new \Wt\Core\Media\Webp($_SERVER['DOCUMENT_ROOT'] . $arParams['SRC']);
$webp = new Webp($_SERVER['DOCUMENT_ROOT'] . $arParams['SRC']);
if($webp->make()->isSuccess()) {
?><source class="owl-lazy" data-srcset="<?=$webp->getPathOut(true)?>" type="image/webp"><?
}