From e8e2594d3e2ecdb578fefa49c6c29a5d40bf2ee3 Mon Sep 17 00:00:00 2001 From: horst-n Date: Mon, 29 Apr 2019 17:30:06 +0200 Subject: [PATCH] force new creation for condition where the regular variation exists and should not be recreated, but where a webp copy, that do not exist, is requested too. --- wire/core/Pageimage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wire/core/Pageimage.php b/wire/core/Pageimage.php index f92377c0..f3da00e3 100644 --- a/wire/core/Pageimage.php +++ b/wire/core/Pageimage.php @@ -804,7 +804,7 @@ class Pageimage extends Pagefile { // no original file exists to create variation from $this->error = "Original image does not exist to create size variation"; - } else if(!$exists || $options['forceNew']) { + } else if(!$exists || $options['forceNew'] || ($options['webpAdd'] && !$this->hasWebp())) { // filenameUnvalidated is temporary filename used for resize $tempDir = $this->pagefiles->page->filesManager()->getTempPath(); $filenameUnvalidated = $tempDir . $basename;