diff --git a/typo3/sysext/core/Classes/Resource/File.php b/typo3/sysext/core/Classes/Resource/File.php
index 3e9316db5f227fb201baedb2e07dcb2c9b4918b8..b03f600afffe005ae4502d09c0b268f8a867ba0e 100644
--- a/typo3/sysext/core/Classes/Resource/File.php
+++ b/typo3/sysext/core/Classes/Resource/File.php
@@ -15,6 +15,7 @@ namespace TYPO3\CMS\Core\Resource;
  */
 
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\MathUtility;
 
 /**
  * File representation in the file abstraction layer.
@@ -296,6 +297,11 @@ class File extends AbstractFile
      */
     public function process($taskType, array $configuration)
     {
+        if ($taskType === ProcessedFile::CONTEXT_IMAGEPREVIEW) {
+            $configuration = array_merge(['width' => 64, 'height' => 64], $configuration);
+            $configuration['width'] = MathUtility::forceIntegerInRange($configuration['width'], 1, 1000);
+            $configuration['height'] = MathUtility::forceIntegerInRange($configuration['height'], 1, 1000);
+        }
         return $this->getStorage()->processFile($this, $taskType, $configuration);
     }
 
diff --git a/typo3/sysext/core/Classes/Resource/ProcessedFile.php b/typo3/sysext/core/Classes/Resource/ProcessedFile.php
index 1e4cc9007e4ddb71e3e2a9fa514bba6beab01a52..b97fd110fc05b46262094ea6d548b96acd1c0300 100644
--- a/typo3/sysext/core/Classes/Resource/ProcessedFile.php
+++ b/typo3/sysext/core/Classes/Resource/ProcessedFile.php
@@ -118,11 +118,6 @@ class ProcessedFile extends AbstractFile
         $this->originalFileSha1 = $this->originalFile->getSha1();
         $this->storage = $originalFile->getStorage()->getProcessingFolder()->getStorage();
         $this->taskType = $taskType;
-        if ($taskType === self::CONTEXT_IMAGEPREVIEW) {
-            $processingConfiguration = array_merge(['width' => 64, 'height' => 64], $processingConfiguration);
-            $processingConfiguration['width'] = MathUtility::forceIntegerInRange($processingConfiguration['width'], 1, 1000);
-            $processingConfiguration['height'] = MathUtility::forceIntegerInRange($processingConfiguration['height'], 1, 1000);
-        }
         $this->processingConfiguration = $processingConfiguration;
         if (is_array($databaseRow)) {
             $this->reconstituteFromDatabaseRecord($databaseRow);