Update (seo)

Add (lqip)
This commit is contained in:
2023-09-25 02:41:40 +08:00
parent ef9c5a1407
commit 3aa6367e83
20 changed files with 163 additions and 38 deletions

View File

@@ -69,9 +69,9 @@ public function getFeaturedImageLqipCdnAttribute()
$extension = pathinfo($this->featured_image, PATHINFO_EXTENSION);
// Append "_lqip" before the extension to create the LQIP image URL
$lqipFeaturedImage = str_replace(".{$extension}", "_lqip.{$extension}", $this->featured_image);
$lqipFeaturedImage = str_replace(".{$extension}", '_lqip.webp', $this->featured_image);
return 'https://'.Storage::disk('r2')->url($lqipFeaturedImage);
return 'https://'.Storage::disk('r2')->url($lqipFeaturedImage).'?a=bc';
}