diff --git a/typo3/sysext/core/Classes/Resource/File.php b/typo3/sysext/core/Classes/Resource/File.php
index a3560f5a25d888cb1f614ef8815cb28d14aabbc7..153a94ee3b6c016913b2e80d862697db9f13b404 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.
@@ -301,6 +302,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 8a494b7a0cb5f51219d7a7d77f450052634ea863..8268e009ab171adfca70550bbcd4ce6e62b7d0e7 100644
--- a/typo3/sysext/core/Classes/Resource/ProcessedFile.php
+++ b/typo3/sysext/core/Classes/Resource/ProcessedFile.php
@@ -117,11 +117,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);