forked from mirror/pixelfed
Update ImageUpdate job, skip non gd-compatible mime types from generating a thumbnail
This commit is contained in:
parent
17e099c206
commit
b0babe819d
1 changed files with 1 additions and 1 deletions
|
@ -43,9 +43,9 @@ class ImageUpdate implements ShouldQueue
|
||||||
$path = storage_path('app/'. $media->media_path);
|
$path = storage_path('app/'. $media->media_path);
|
||||||
$thumb = storage_path('app/'. $media->thumbnail_path);
|
$thumb = storage_path('app/'. $media->thumbnail_path);
|
||||||
try {
|
try {
|
||||||
ImageOptimizer::optimize($thumb);
|
|
||||||
if(!in_array($media->mime, $this->protectedMimes))
|
if(!in_array($media->mime, $this->protectedMimes))
|
||||||
{
|
{
|
||||||
|
ImageOptimizer::optimize($thumb);
|
||||||
ImageOptimizer::optimize($path);
|
ImageOptimizer::optimize($path);
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
Loading…
Reference in a new issue