diff --git a/Classes/Aspects/ThumbnailAspect.php b/Classes/Aspects/ThumbnailAspect.php index b77256f..b2ffd8d 100644 --- a/Classes/Aspects/ThumbnailAspect.php +++ b/Classes/Aspects/ThumbnailAspect.php @@ -64,8 +64,8 @@ public function optimizeThumbnail(JoinPointInterface $joinPoint) { $thumbnail = $joinPoint->getProxy(); $thumbnailResource = $thumbnail->getResource(); - // Easy workaround for getting local path since the resource API doesn't allow it due to support for non local file system targets - $pathAndFilename = realpath(FLOW_PATH_WEB . parse_url($this->resourceManager->getPublicPersistentResourceUri($thumbnailResource), PHP_URL_PATH)); + $streamMetaData = stream_get_meta_data($thumbnailResource->getStream()); + $pathAndFilename = $streamMetaData['uri']; $useGlobalBinary = $this->settings['useGlobalBinary']; $binaryRootPath = 'Private/Library/node_modules/'; @@ -124,4 +124,4 @@ public function optimizeThumbnail(JoinPointInterface $joinPoint) { $this->systemLogger->log($cmd . ' (' . ((int)$result === 0 ? 'OK' : 'Error: ' . $result) . ')', LOG_INFO, $output); } -} \ No newline at end of file +}