Respect photo thumbnails storage in import

This commit is contained in:
Max Kostikov 2019-06-21 22:27:27 +02:00
parent dd515da889
commit e8918ca149

View File

@ -371,21 +371,19 @@ function import_channel_photo($photo, $type, $aid, $uid) {
// photo size
$img->scaleImageSquare(300);
$r = $img->save($p);
$r = $img->storeThumbnail($p, PHOTO_RES_PROFILE_300);
if($r === false)
$photo_failure = true;
// thumb size
$img->scaleImage(80);
$p['imgscale'] = 5;
$r = $img->save($p);
$r = $img->storeThumbnail($p, PHOTO_RES_PROFILE_80);
if($r === false)
$photo_failure = true;
// micro size
$img->scaleImage(48);
$p['imgscale'] = 6;
$r = $img->save($p);
$r = $img->storeThumbnail($p, PHOTO_RES_PROFILE_48);
if($r === false)
$photo_failure = true;