Remove thumbnail generation from MediaImporter
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 27 Apr 2021 12:09:36 +0000 (14:09 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 27 Apr 2021 12:09:36 +0000 (14:09 +0200)
This is useless, because it can be performed using MediaRebuildDataWorker. It
might also break the import process for borked source images.

see 44f9dba4c98359b53679cdac3bb43982e716a7e1

wcfsetup/install/files/lib/system/importer/MediaImporter.class.php

index 3755c6d512f8d58bc212097ae4e901b6f71e3b7a..0ec022913c72f14fe5395d92d0c81d69f4306cac 100644 (file)
@@ -112,11 +112,6 @@ class MediaImporter extends AbstractImporter {
                        $statement->execute([$media->mediaID, $languageID ?: null, $contentData['title'], $contentData['caption'], $contentData['altText']]);
                }
                
-               // create thumbnails
-               if ($media->isImage) {
-                       $this->getSaveStrategy()->generateThumbnails($media);
-               }
-               
                ImportHandler::getInstance()->saveNewID('com.woltlab.wcf.media', $oldID, $media->mediaID);
                return $media->mediaID;
        }