mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Make webp default format for images
This commit is contained in:
@@ -52,9 +52,10 @@ class BookResource extends JsonResource
|
||||
return null;
|
||||
}
|
||||
|
||||
$coverPath = storage_path('covers/book/'.$this->id.'.jpg');
|
||||
if (file_exists($coverPath)) {
|
||||
return url('/covers/book/'.$this->id.'.jpg');
|
||||
$coverPath = storage_path('covers/book/'.$this->id.'.webp');
|
||||
$legacyPath = storage_path('covers/book/'.$this->id.'.jpg');
|
||||
if (file_exists($coverPath) || file_exists($legacyPath)) {
|
||||
return url('/covers/book/'.$this->id.'.webp');
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user