Add (tint)

This commit is contained in:
2023-11-21 01:21:30 +08:00
parent 7166eb610c
commit e4bab8dcec
48 changed files with 229 additions and 58 deletions

View File

@@ -81,7 +81,7 @@ protected function featuredImage(): Attribute
);
}
protected function getFeaturedThumbImageAttribute()
protected function getFeaturedOgImageAttribute()
{
$value = $this->featured_image;
@@ -91,10 +91,9 @@ protected function getFeaturedThumbImageAttribute()
// Extract the file extension
$extension = pathinfo($value, PATHINFO_EXTENSION);
// Construct the thumbnail filename by appending '_thumb' before the extension
$thumbnail = str_replace(".{$extension}", "_thumb.{$extension}", $value);
$og = str_replace(".{$extension}", "_og.{$extension}", $value);
return $thumbnail;
return $og;
// Return the full URL to the thumbnail image
//return Storage::disk('r2')->url($thumbnail);