Skip to content

Commit 9b83e4b

Browse files
committed
refactor: rimossa funzione doppia
1 parent 8896268 commit 9b83e4b

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

src/Models/Upload.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -424,23 +424,4 @@ protected static function generateThumbnails($upload)
424424
$img->scale(100, null);
425425
$img->save(slashes($directory.'/'.$info['filename'].'_thumb100.'.$info['extension']));
426426
}
427-
428-
protected static function ridimensionaImmagini($upload)
429-
{
430-
$info = $upload->info;
431-
$directory = $upload->attachments_directory;
432-
433-
$filepath = base_dir().'/'.$info['dirname'].'/'.$info['filename'].'.'.$info['extension'];
434-
435-
if (!in_array(mime_content_type($filepath), ['image/png', 'image/gif', 'image/jpeg'])) {
436-
return;
437-
}
438-
439-
$img = getImageManager()->read($filepath);
440-
441-
$img->resize(setting('Larghezza per ridimensionamento immagini'), null, function ($constraint) {
442-
$constraint->aspectRatio();
443-
});
444-
$img->save(slashes($filepath));
445-
}
446427
}

0 commit comments

Comments
 (0)