webp
This commit is contained in:
parent
068492e495
commit
53a2ed8b0f
11 changed files with 29 additions and 21 deletions
|
|
@ -4,11 +4,11 @@
|
|||
$alt = $alt ?? $file->alt();
|
||||
$crop = $crop ?? false;
|
||||
|
||||
$webPSrcset = $crop === 'banner' ? $file->crop(1600, 800)->srcset('webp') : $file->srcset('webp');
|
||||
$srcset = $crop === 'banner' ? $file->crop(1600, 800)->srcset() : $file->srcset();
|
||||
$src = $crop === 'banner' ? $file->crop(1600, 800)->url() : $file->url();
|
||||
$width = $crop === 'banner' ? $file->crop(1600, 800)->width() : $file->resize(1800)->width();
|
||||
$height = $crop === 'banner' ? $file->crop(1600, 800)->height() : $file->resize(1800)->height();
|
||||
$webPSrcset = $file->srcset('webp');
|
||||
$srcset = $file->srcset();
|
||||
$src = $file->url();
|
||||
$width = $file->resize(1800)->width();
|
||||
$height = $file->resize(1800)->height();
|
||||
$class = isset($class) ? 'class="' . $class . '"': '';
|
||||
$lazy = $lazy ?? true;
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue