Skip to content

Commit

Permalink
Fix an error when trying to process remote-filesystem assets
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Sep 19, 2023
1 parent cc34502 commit 743562c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/jobs/ImageResize.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function execute($queue)

if ($asset) {
$filename = $asset->filename;
$path = $asset->getImageTransformSourcePath();
$path = $asset->tempFilePath ?? $asset->getImageTransformSourcePath();
$width = $this->imageWidth;
$height = $this->imageHeight;

Expand Down
2 changes: 1 addition & 1 deletion src/services/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function beforeHandleAssetFile(AssetEvent $event)
{
$asset = $event->sender;
$filename = $asset->filename;
$path = $asset->tempFilePath;
$path = $asset->tempFilePath ?? $asset->getImageTransformSourcePath();

if (!$path) {
ImageResizer::$plugin->logs->resizeLog(null, 'error', $filename, ['message' => 'Unable to find path: ' . $path]);
Expand Down

0 comments on commit 743562c

Please sign in to comment.