Skip to content

Commit

Permalink
Changed webp path /fursuits/ -> /gallery/fursuits/
Browse files Browse the repository at this point in the history
  • Loading branch information
TLTimeplex committed Oct 8, 2024
1 parent 5f2ad34 commit 9d143bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Models/Fursuit/Fursuit.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ public function imageWebpUrl(): Attribute
if (!$this->image_webp) {
$originalImage = Storage::get($this->image);
$manager = new ImageManager(new Driver());
$path = '/fursuits/' . pathinfo($this->image, PATHINFO_FILENAME) . '.webp'; // TODO: Change to correct path
$path = '/gallery/fursuits/' . pathinfo($this->image, PATHINFO_FILENAME) . '.webp';
$webp = $manager->read($originalImage)->toWebp();
Storage::put($path, $webp);
$this->update(['image_webp' => $path]);
}

return Attribute::make(
get: function ($value) {
return Storage::temporaryUrl($this->image_webp, now()->addMinutes(60));
return Storage::temporaryUrl($this->image_webp, now()->addMinutes(5)); // TODO: Change to permanent link when public
},
);
}
Expand Down

0 comments on commit 9d143bc

Please sign in to comment.