added lazy load to images

master
A1Gard 2 weeks ago
parent ecf88a7dac
commit 391caa1bd3

@ -8,7 +8,7 @@
@foreach( getCategorySubCatsBySetting($data->area_name.'_'.$data->part.'_category',8) as $category ) @foreach( getCategorySubCatsBySetting($data->area_name.'_'.$data->part.'_category',8) as $category )
<div class="item"> <div class="item">
<a href="{{$category->webUrl()}}"> <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> </a>
</div> </div>
@endforeach @endforeach

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

@ -22,7 +22,7 @@
</div> </div>
@endforeach @endforeach
<div class="col-12"> <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> </div>
</div> </div>

@ -9,7 +9,7 @@
@foreach($category->children as $subCat) @foreach($category->children as $subCat)
<div class="col-md"> <div class="col-md">
<div class="sub-category"> <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> <h4>
{{$subCat->name}} {{$subCat->name}}
</h4> </h4>

@ -4,7 +4,7 @@
{{$title}} {{$title}}
</h1> </h1>
<div id="video-preview-botz"> <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> </div>
<mp4player <mp4player
asset="{{$clip->fileUrl()}}" cover="{{$clip->imgUrl()}}"></mp4player> asset="{{$clip->fileUrl()}}" cover="{{$clip->imgUrl()}}"></mp4player>

@ -7,7 +7,7 @@
@foreach(\App\Models\Clip::where('status',1)->get() as $clip) @foreach(\App\Models\Clip::where('status',1)->get() as $clip)
<div class="autoplay-clip-item"> <div class="autoplay-clip-item">
<a href="{{$clip->webUrl()}}"> <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> </a>
{{-- <img src="{{$clip->imgUrl()}}" alt="">--}} {{-- <img src="{{$clip->imgUrl()}}" alt="">--}}
</div> </div>

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

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

@ -110,7 +110,7 @@
->where('is_pinned',0)->orderByDesc('id')->get() as $i => $post) ->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="row mb-2" @if( ($i % 2) == 0) dir="rtl" @else dir="ltr" @endif>
<div class="col-md-2"> <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>
<div class="col-md" dir="{{$dir}}"> <div class="col-md" dir="{{$dir}}">
<h3> <h3>

@ -511,7 +511,7 @@
<div class="product-item"> <div class="product-item">
<div class="row"> <div class="row">
<div class="col-md-2"> <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>
<div class="col-md-10"> <div class="col-md-10">
<h4> <h4>

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

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

@ -7,7 +7,7 @@
<div class="aparat-item"> <div class="aparat-item">
<a class="gallery-image aparat-link" <a class="gallery-image aparat-link"
href="{{$image->imgOriginalUrl()}}"> 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> </a>
</div> </div>
@endforeach @endforeach

@ -5,7 +5,7 @@
@foreach($gallery->images as $image) @foreach($gallery->images as $image)
<div class="col-lg-3 col-md-6 mb-4"> <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()}}"> <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> </a>
</div> </div>
@endforeach @endforeach

@ -9,7 +9,7 @@
@foreach($group->children as $subGroup) @foreach($group->children as $subGroup)
<div class="col-md"> <div class="col-md">
<div class="sub-group"> <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> <h4>
{{$subGroup->name}} {{$subGroup->name}}
</h4> </h4>

@ -16,7 +16,7 @@
<div class="author-slide"> <div class="author-slide">
<a href="{{$post->webUrl()}}"> <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"> <div class="contents">
<h3> <h3>

@ -28,7 +28,7 @@
</li> </li>
</ol> </ol>
</nav> </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"> <p class="text-muted my-3">
{{$post->subtitle}} {{$post->subtitle}}
</p> </p>

@ -21,7 +21,7 @@
</li> </li>
</ol> </ol>
</nav> </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"> <p class="text-muted my-3">
{{$post->subtitle}} {{$post->subtitle}}
</p> </p>

@ -6,7 +6,7 @@
<div class="col-lg-3 col-md-6"> <div class="col-lg-3 col-md-6">
<div class=" no-link-item mb-4"> <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> <h3>
{{$post->title}} {{$post->title}}
</h3> </h3>

@ -12,7 +12,7 @@
@foreach( getGroupPostsBySetting($data->area_name.'_'.$data->part.'_group',4) as $post ) @foreach( getGroupPostsBySetting($data->area_name.'_'.$data->part.'_group',4) as $post )
<div class="col-lg-3 col-md-6"> <div class="col-lg-3 col-md-6">
<div class="post-img-index"> <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> <h3>
{{$post->title}} {{$post->title}}
</h3> </h3>

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

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

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

@ -17,7 +17,7 @@
@foreach(\App\Models\Post::where('status',1)->orderByDesc('id')->limit(5)->get() as $pst) @foreach(\App\Models\Post::where('status',1)->orderByDesc('id')->limit(5)->get() as $pst)
<li> <li>
<a href="{{$pst->webUrl()}}"> <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> <h6>
{{$pst->title}} {{$pst->title}}
</h6> </h6>

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

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

@ -17,7 +17,7 @@
@foreach(\App\Models\Post::where('status',1)->orderByDesc('id')->limit(5)->get() as $pst) @foreach(\App\Models\Post::where('status',1)->orderByDesc('id')->limit(5)->get() as $pst)
<li> <li>
<a href="{{$pst->webUrl()}}"> <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> <h6>
{{$pst->title}} {{$pst->title}}
</h6> </h6>

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

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

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

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

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

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

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

Loading…
Cancel
Save