From 8b07a4b47874ee6b4025d96c428ac7760a9a5884 Mon Sep 17 00:00:00 2001 From: Christian Stocker Date: Tue, 4 Oct 2022 11:16:40 +0200 Subject: [PATCH] return $this on save --- lib/Imagine/Vips/Image.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Imagine/Vips/Image.php b/lib/Imagine/Vips/Image.php index 28aab29..7d347b5 100644 --- a/lib/Imagine/Vips/Image.php +++ b/lib/Imagine/Vips/Image.php @@ -441,7 +441,8 @@ public function save($path = null, array $options = []) if (null !== $method) { try { - return $vips->$method($path, $saveOptions); + $vips->$method($path, $saveOptions); + return $this; } catch (\Jcupitt\Vips\Exception $e) { // try the alternative approach if method is magicksave, if we fail here, mainly means that the magicksave stuff isn't // installed