diff --git a/Classes/EelHelpers/AbstractImageSourceHelper.php b/Classes/EelHelpers/AbstractImageSourceHelper.php index 1c90d92..16b760a 100644 --- a/Classes/EelHelpers/AbstractImageSourceHelper.php +++ b/Classes/EelHelpers/AbstractImageSourceHelper.php @@ -118,7 +118,6 @@ public function allowsCallOfMethod($methodName) } } - /** * If the source is cast to string the default source is returned * @@ -126,6 +125,10 @@ public function allowsCallOfMethod($methodName) */ public function __toString(): string { - return $this->src(); + try { + return $this->src(); + } catch (\Exception $e) { + return $e->getMessage(); + } } }