Skip to content

Commit

Permalink
Reset image transforms after process to avoid unexpected effects
Browse files Browse the repository at this point in the history
  • Loading branch information
giuscris committed Sep 21, 2024
1 parent 352a464 commit 029f80b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions formwork/src/Images/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,12 @@ public function process(?string $mimeType = null, bool $forceCache = false): Ima

$image = new Image($path, $this->options);
$image->uriGenerator = $this->uriGenerator;
$image->transforms = $this->transforms;
$image->handler = $this->handler;

$this->transforms = new TransformCollection();
unset($this->handler);

return $image;
}

Expand Down

0 comments on commit 029f80b

Please sign in to comment.