added lazy load to images

pull/49/head
A1Gard 2 months ago
parent ecf88a7dac
commit 391caa1bd3

@ -8,7 +8,7 @@
@foreach( getCategorySubCatsBySetting($data->area_name.'_'.$data->part.'_category',8) as $category )
<div class="item">
<a href="{{$category->webUrl()}}">
<img src="{{$category->imgUrl()}}" alt="{{$category->name}}" title="{{$category->name}}">
<img src="{{$category->imgUrl()}}" alt="{{$category->name}}" title="{{$category->name}}" loading="lazy">
</a>
</div>
@endforeach

@ -9,7 +9,7 @@
<div class="cat-grid-item">
<a href="{{$category->webUrl()}}">
<img src="{{$category->imgUrl()}}" alt="{{$category->name}}"
title="{{$category->name}}">
title="{{$category->name}}" loading="lazy" >
<h3 class="py-3">
{{$category->name}}
</h3>

@ -22,7 +22,7 @@
</div>
@endforeach
<div class="col-12">
<img src="{{$productFav[0]->originalOptimizedImageUrl()}}" class="img-fluid" alt=" {{$productFav[0]->name}}">
<img src="{{$productFav[0]->originalOptimizedImageUrl()}}" class="img-fluid" alt=" {{$productFav[0]->name}}" loading="lazy">
</div>
</div>
</div>

@ -9,7 +9,7 @@
@foreach($category->children as $subCat)
<div class="col-md">
<div class="sub-category">
<img src="{{$subCat->imgUrl()}}" alt="{{$subCat->name}}" class="img-fluid">
<img src="{{$subCat->imgUrl()}}" alt="{{$subCat->name}}" class="img-fluid" loading="lazy">
<h4>
{{$subCat->name}}
</h4>

@ -4,7 +4,7 @@
{{$title}}
</h1>
<div id="video-preview-botz">
<video controls src="{{$clip->fileUrl()}}" poster="{{$clip->imgUrl()}}"></video>
<video controls src="{{$clip->fileUrl()}}" poster="{{$clip->imgUrl()}}" preload="none"></video>
</div>
<mp4player
asset="{{$clip->fileUrl()}}" cover="{{$clip->imgUrl()}}"></mp4player>

@ -7,7 +7,7 @@
@foreach(\App\Models\Clip::where('status',1)->get() as $clip)
<div class="autoplay-clip-item">
<a href="{{$clip->webUrl()}}">
<video src="{{$clip->fileUrl()}}" poster="{{$clip->imgUrl()}}" muted ></video>
<video preload="none" src="{{$clip->fileUrl()}}" poster="{{$clip->imgUrl()}}" muted ></video>
</a>
{{-- <img src="{{$clip->imgUrl()}}" alt="">--}}
</div>

@ -10,7 +10,7 @@
<div class="clip-grid-item">
<a href="{{$clip->webUrl()}}">
<img src="{{$clip->imgUrl()}}" alt="">
<img src="{{$clip->imgUrl()}}" alt="" loading="lazy">
<h2>
<span>
{{$clip->title}}

@ -8,7 +8,7 @@
<div class="col-md">
<div class="compare">
<div class="top">
<img src="{{$product->originalImageUrl()}}" alt="">
<img src="{{$product->originalImageUrl()}}" alt="" loading="lazy">
<h2>
{{$product->name}}
</h2>

@ -110,7 +110,7 @@
->where('is_pinned',0)->orderByDesc('id')->get() as $i => $post)
<div class="row mb-2" @if( ($i % 2) == 0) dir="rtl" @else dir="ltr" @endif>
<div class="col-md-2">
<img src="{{$post->imgUrl()}}" alt="{{$post->title}}" class="img-fluid">
<img src="{{$post->imgUrl()}}" alt="{{$post->title}}" class="img-fluid" loading="lazy">
</div>
<div class="col-md" dir="{{$dir}}">
<h3>

@ -511,7 +511,7 @@
<div class="product-item">
<div class="row">
<div class="col-md-2">
<img src="{{$fav->imgUrl()}}" class="img-fluid" alt="{{$fav->name}}">
<img src="{{$fav->imgUrl()}}" class="img-fluid" alt="{{$fav->name}}" loading="lazy">
</div>
<div class="col-md-10">
<h4>

@ -8,7 +8,7 @@
<div class="col-md p-1">
<a class="gallery-grid" href="{{$gallery->webUrl()}}">
<img src="{{$gallery->imgUrl()}}" alt="{{$gallery->title}}">
<img src="{{$gallery->imgUrl()}}" alt="{{$gallery->title}}" loading="lazy">
<h4>
<span>
{{$gallery->title}}

@ -9,7 +9,7 @@
<div class="col-md-6 p-1">
<div class="gallrey-item">
<a href="{{$gallery->webUrl()}}">
<img src="{{$gallery->imgUrl()}}" alt="{{$gallery->title}}">
<img src="{{$gallery->imgUrl()}}" alt="{{$gallery->title}}" loading="lazy">
</a>
<h4 class="text-center">
{{$gallery->title}}

@ -7,7 +7,7 @@
<div class="aparat-item">
<a class="gallery-image aparat-link"
href="{{$image->imgOriginalUrl()}}">
<img src="{{$image->imgurl()}}" class="img-fluid" alt="{{$image->title}}" title="{{$image->title}}">
<img src="{{$image->imgurl()}}" class="img-fluid" alt="{{$image->title}}" title="{{$image->title}}" loading="lazy">
</a>
</div>
@endforeach

@ -5,7 +5,7 @@
@foreach($gallery->images as $image)
<div class="col-lg-3 col-md-6 mb-4">
<a class="gallery-image light-box" data-toggle="lightbox" data-gallery="{{$gallery->slug}}" href="{{$image->imgOriginalUrl()}}">
<img src="{{$image->imgurl()}}" class="img-fluid" alt="{{$image->title}}" title="{{$image->title}}">
<img src="{{$image->imgurl()}}" class="img-fluid" alt="{{$image->title}}" title="{{$image->title}}" loading="lazy">
</a>
</div>
@endforeach

@ -9,7 +9,7 @@
@foreach($group->children as $subGroup)
<div class="col-md">
<div class="sub-group">
<img src="{{$subGroup->imgUrl()}}" alt="{{$subGroup->name}}" class="img-fluid">
<img src="{{$subGroup->imgUrl()}}" alt="{{$subGroup->name}}" class="img-fluid" loading="lazy">
<h4>
{{$subGroup->name}}
</h4>

@ -16,7 +16,7 @@
<div class="author-slide">
<a href="{{$post->webUrl()}}">
<img src="{{$post->orgUrl()}}" class="float-end" alt=" {{$post->title}}">
<img src="{{$post->orgUrl()}}" class="float-end" alt=" {{$post->title}}" loading="lazy">
<div class="contents">
<h3>

@ -28,7 +28,7 @@
</li>
</ol>
</nav>
<img src="{{$post->orgUrl()}}" alt="" class="img-fluid">
<img src="{{$post->orgUrl()}}" alt="" class="img-fluid" loading="lazy">
<p class="text-muted my-3">
{{$post->subtitle}}
</p>

@ -21,7 +21,7 @@
</li>
</ol>
</nav>
<img src="{{$post->orgUrl()}}" alt="" class="img-fluid">
<img src="{{$post->orgUrl()}}" alt="" class="img-fluid" loading="lazy">
<p class="text-muted my-3">
{{$post->subtitle}}
</p>

@ -6,7 +6,7 @@
<div class="col-lg-3 col-md-6">
<div class=" no-link-item mb-4">
<img src="{{$post->orgUrl()}}" class="float-start me-2" alt=" {{$post->title}}">
<img src="{{$post->orgUrl()}}" class="float-start me-2" alt=" {{$post->title}}" loading="lazy">
<h3>
{{$post->title}}
</h3>

@ -12,7 +12,7 @@
@foreach( getGroupPostsBySetting($data->area_name.'_'.$data->part.'_group',4) as $post )
<div class="col-lg-3 col-md-6">
<div class="post-img-index">
<img src="{{$post->imgUrl()}}" alt="{{$post->title}}" class="img-fluid">
<img src="{{$post->imgUrl()}}" alt="{{$post->title}}" class="img-fluid" loading="lazy">
<h3>
{{$post->title}}
</h3>

@ -14,7 +14,7 @@
<div class="post-slider">
<a href="{{$post->webUrl()}}">
<img src="{{$post->orgUrl()}}" alt=" {{$post->title}}">
<img src="{{$post->orgUrl()}}" alt=" {{$post->title}}" loading="lazy">
<h3>
{{$post->title}}
</h3>

@ -10,7 +10,7 @@
</div>
<a href="{{$post->webUrl()}}">
<img src="{{$post->orgUrl()}}" alt="{{$post->title}}"
title="{{implode(',',$post->tags->pluck('name')->toArray()??'')}}">
title="{{implode(',',$post->tags->pluck('name')->toArray()??'')}}" loading="lazy">
</a>
<div class="detail">
<h4>
@ -36,7 +36,7 @@
<div class="corner">
{{$post->mainGroup->name}}
</div>
<img src="{{$post->imgUrl()}}" alt="{{$post->title}}">
<img src="{{$post->imgUrl()}}" alt="{{$post->title}}" loading="lazy">
<h4>
{{$post->title}}
</h4>

@ -10,7 +10,7 @@
</div>
<a href="{{$post->webUrl()}}">
<img src="{{$post->orgUrl()}}" alt="{{$post->title}}"
title="{{implode(',',$post->tags->pluck('name')->toArray()??'')}}">
title="{{implode(',',$post->tags->pluck('name')->toArray()??'')}}" loading="lazy">
</a>
<div class="detail">
<h4>
@ -40,7 +40,7 @@
<div class="corner">
{{$post->mainGroup->name}}
</div>
<img src="{{$post->imgUrl()}}" alt="{{$post->title}}">
<img src="{{$post->imgUrl()}}" alt="{{$post->title}}" loading="lazy">
<h4>
{{$post->title}}
</h4>

@ -17,7 +17,7 @@
@foreach(\App\Models\Post::where('status',1)->orderByDesc('id')->limit(5)->get() as $pst)
<li>
<a href="{{$pst->webUrl()}}">
<img src="{{$pst->imgUrl()}}" alt="{{$pst->title}}" class="float-start me-2">
<img src="{{$pst->imgUrl()}}" alt="{{$pst->title}}" class="float-start me-2" loading="lazy">
<h6>
{{$pst->title}}
</h6>

@ -10,7 +10,7 @@
</div>
<a href="{{$post->webUrl()}}">
<img src="{{$post->orgUrl()}}" alt="{{$post->title}}"
title="{{implode(',',$post->tags->pluck('name')->toArray()??'')}}">
title="{{implode(',',$post->tags->pluck('name')->toArray()??'')}}" loading="lazy">
</a>
<div class="detail">
<h4>
@ -28,7 +28,7 @@
@endif
@foreach($posts as $post)
<div class="post-list-item">
<img src="{{$post->imgUrl()}}" class="float-start me-4" alt="{{$post->title}}">
<img src="{{$post->imgUrl()}}" class="float-start me-4" alt="{{$post->title}}" loading="lazy">
<h4>
{{$post->title}}
</h4>

@ -10,7 +10,7 @@
</div>
<a href="{{$post->webUrl()}}">
<img src="{{$post->orgUrl()}}" alt="{{$post->title}}"
title="{{implode(',',$post->tags->pluck('name')->toArray()??'')}}">
title="{{implode(',',$post->tags->pluck('name')->toArray()??'')}}" loading="lazy">
</a>
<div class="detail">
<h4>
@ -35,7 +35,7 @@
<div class="col-lg-9">
@foreach($posts as $post)
<div class="post-list-item">
<img src="{{$post->imgUrl()}}" class="float-start me-4" alt="{{$post->title}}">
<img src="{{$post->imgUrl()}}" class="float-start me-4" alt="{{$post->title}}" loading="lazy">
<h4>
{{$post->title}}
</h4>

@ -17,7 +17,7 @@
@foreach(\App\Models\Post::where('status',1)->orderByDesc('id')->limit(5)->get() as $pst)
<li>
<a href="{{$pst->webUrl()}}">
<img src="{{$pst->imgUrl()}}" alt="{{$pst->title}}" class="float-start me-2">
<img src="{{$pst->imgUrl()}}" alt="{{$pst->title}}" class="float-start me-2" loading="lazy">
<h6>
{{$pst->title}}
</h6>

@ -206,7 +206,7 @@
<div class="item">
<div class="aria-product-list">
<a href="{{$p->imgUrl()}}">
<img src="{{$p->imgUrl()}}" alt="{{$p->name}}">
<img src="{{$p->imgUrl()}}" alt="{{$p->name}}" loading="lazy">
<h5>
{{$p->name}}
</h5>

@ -7,7 +7,7 @@
<div id="preview">
<a href="{{$product->originalImageUrl()}}" id="karen-main-img" class="light-box"
data-gallery="karen-products">
<img src="{{$product->originalImageUrl()}}" alt="{{$product->name}}">
<img src="{{$product->originalImageUrl()}}" alt="{{$product->name}}" >
</a>
</div>
<div id="karen-img-slider">
@ -202,7 +202,7 @@
<div class="item">
<div class="karen-product-list">
<a href="{{$p->imgUrl()}}">
<img src="{{$p->imgUrl()}}" alt="{{$p->name}}">
<img src="{{$p->imgUrl()}}" alt="{{$p->name}}" loading="lazy">
<h5>
{{$p->name}}
</h5>

@ -21,7 +21,7 @@
<i class="ri-scales-3-line"></i>
</a>
<a href="{{$product->webUrl()}}">
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}">
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}" loading="lazy">
<h3>
{{$product->name}}
</h3>

@ -14,7 +14,7 @@
<div class="item slider-content">
<div class="tree-product-box">
<a href="{{$product->webUrl()}}">
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}">
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}" loading="lazy">
</a>
<h4>
<a href="{{$product->webUrl()}}">
@ -48,7 +48,7 @@
@foreach(getCategoryProductBySetting($part->area_name . '_' . $part->part.'_categoryx') as $product)
<div class="item text-center slider-content">
<a href="{{$product->webUrl()}}">
<img src="{{$product->imgUrl()}}" class="img-fluid" alt="{{$product->name}}">
<img src="{{$product->imgUrl()}}" class="img-fluid" alt="{{$product->name}}" loading="lazy">
</a>
</div>
@endforeach
@ -63,7 +63,7 @@
@foreach(getCategoryProductBySetting($part->area_name . '_' . $part->part.'_categoryy') as $product)
<div class="item text-center slider-content">
<a href="{{$product->webUrl()}}">
<img src="{{$product->imgUrl()}}" class="img-fluid" alt="{{$product->name}}">
<img src="{{$product->imgUrl()}}" class="img-fluid" alt="{{$product->name}}" loading="lazy">
</a>
</div>
@endforeach

@ -19,7 +19,7 @@
<i class="ri-scales-3-line"></i>
</a>
<a href="{{$product->webUrl()}}">
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}">
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}" loading="lazy">
<h3>
{{$product->name}}
</h3>

@ -27,7 +27,7 @@
<i class="ri-scales-3-line"></i>
</a>
<a href="{{$product->webUrl()}}">
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}">
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}" loading="lazy">
<h3>
{{$product->name}}
</h3>

@ -2,7 +2,7 @@
<div class='SliderSimple'>
@foreach(\App\Models\Slider::where('status',1)->get() as $slider)
<div class="item">
<img src="{{$slider->imgUrl()}}" alt="{{strip_tags($slider->body)}}">
<img src="{{$slider->imgUrl()}}" alt="{{strip_tags($slider->body)}}" >
<div class="desc">
{!! $slider->body !!}
</div>

Loading…
Cancel
Save