This commit is contained in:
2021-08-14 14:35:10 +03:00
parent 6da6da6ad0
commit a66ccba187
63 changed files with 24744 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
<?
use Wt\Core\Type;
?>
<picture class="kit-picture <?=$arParams['CLASS']?>">
<?
$webp = new \Bx\Kit\Image\Webp($_SERVER['DOCUMENT_ROOT'] . $arParams['SRC']);
if($webp->convert()->isSuccess()) {
$webpSrc = $webp->getRelativePath();
?><source srcset="<?=$webpSrc?>" type="image/webp"><?
}
?>
<img src="<?=$arParams['SRC']?>" alt="<?=Type\Str::safeHtmlAttr($arParams['ALT'])?>"<?if($arParams['TITLE']) {?> title="<?=Type\Str::safeHtmlAttr($arParams['TITLE'])?>"<?}?>
<?=\Bx\Kit\Node\Lib::getAttrByArray($arParams['ATTR']);?>
/>
</picture>