Optimize images to WebP and enable lazy loading. Add security headers (HSTS, CSP, etc) for A+ SSL score.

This commit is contained in:
Muhammet Güler
2026-02-17 10:30:36 +03:00
parent 7101f7878a
commit 477993ec83
743 changed files with 927 additions and 232 deletions
@@ -21,7 +21,7 @@
$excerpt = method_exists($blog, 'translate') ? $blog->translate('excerpt') : ($blog->excerpt ?? '');
$categoryName = $blog->category ? ($blog->category->name ?? '') : '';
$publishedDate = $blog->published_at ? $blog->published_at->format('d M Y') : '';
$imageUrl = $blog->featured_image ? asset('storage/' . $blog->featured_image) : asset('assets/img/photos/b4.jpg');
$imageUrl = $blog->featured_image ? asset('storage/' . $blog->featured_image) : asset('assets/img/photos/b4.webp');
$blogUrl = route('blog.show', $blog->slug);
$commentCount = $blog->comments_count ?? 0;
@endphp
@@ -30,7 +30,7 @@
<article>
<figure class="overlay overlay-1 hover-scale group rounded !mb-5">
<a href="{{ $blogUrl }}">
<img class="!transition-all !duration-[0.35s] !ease-in-out group-hover:scale-105" src="{{ $imageUrl }}" alt="{{ $title }}">
<img class="!transition-all !duration-[0.35s] !ease-in-out group-hover:scale-105" src="{{ $imageUrl }}" alt="{{ $title }}" loading="lazy">
</a>
<figcaption class="group-hover:opacity-100 absolute w-full h-full opacity-0 text-center px-4 py-3 inset-0 z-[5] pointer-events-none p-2">
<h5 class="from-top !mb-0 absolute w-full translate-y-[-80%] p-[.75rem_1rem] left-0 top-2/4">{{ __('blog.read_more', ['default' => 'Read More']) }}</h5>