1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-17 12:10:45 +02:00

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.
This commit is contained in:
horst-n
2019-04-29 17:30:06 +02:00
parent 540ae4f2d9
commit e8e2594d3e

View File

@@ -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;