mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
16 lines
681 B
PHP
16 lines
681 B
PHP
<picture class="kit-picture">
|
|
<?
|
|
$webp = new \Bx\Kit\Image\Webp($_SERVER['DOCUMENT_ROOT'] . $arParams['SRC']);
|
|
if($webp->convert()->isSuccess()) {
|
|
$webpSrc = $webp->getRelativePath();
|
|
?><source class="owl-lazy" data-srcset="<?=$webpSrc?>" type="image/webp"><?
|
|
}
|
|
?>
|
|
<img class="kit-img owl-lazy" data-src="<?=$arParams['SRC']?>" alt="<?=\Bx\Kit\Lib\Type\Str::safeHtmlAttr($arParams['ALT'])?>"<?if($arParams['TITLE']) {?> title="<?=\Bx\Kit\Lib\Type\Str::safeHtmlAttr($arParams['TITLE'])?>"<?}?>
|
|
<?
|
|
if($arParams['ATTR']) {
|
|
echo \Bx\Kit\Template::get('attr', $arParams['ATTR']);
|
|
}
|
|
?>
|
|
/>
|
|
</picture>
|