Skip to content
Snippets Groups Projects
Commit f21ca576 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(housekeeping): set default sizes value + ignore illegal IFD size error to proceed with script

parent 3bfcce37
Branches
Tags
No related merge requests found
......@@ -48,7 +48,8 @@ class Image extends BaseMedia
{
parent::setFile($file);
if ($this->file_mimetype === 'image/jpeg' && $metadata = exif_read_data(
// @phpstan-ignore-next-line
if ($this->file_mimetype === 'image/jpeg' && $metadata = @exif_read_data(
media_path($this->file_path),
null,
true
......
......@@ -217,7 +217,10 @@ class SettingsController extends BaseController
} elseif (str_starts_with($image->file_path, 'persons')) {
$image->sizes = config('Images')
->personAvatarSizes;
} else {
$image->sizes = [];
}
$image->setFile(new File(media_path($image->file_path)));
(new MediaModel('image'))->updateMedia($image);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment