mirror of
https://github.com/processwire/processwire.git
synced 2025-08-18 04:22:10 +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:
@@ -804,7 +804,7 @@ class Pageimage extends Pagefile {
|
|||||||
// no original file exists to create variation from
|
// no original file exists to create variation from
|
||||||
$this->error = "Original image does not exist to create size variation";
|
$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
|
// filenameUnvalidated is temporary filename used for resize
|
||||||
$tempDir = $this->pagefiles->page->filesManager()->getTempPath();
|
$tempDir = $this->pagefiles->page->filesManager()->getTempPath();
|
||||||
$filenameUnvalidated = $tempDir . $basename;
|
$filenameUnvalidated = $tempDir . $basename;
|
||||||
|
Reference in New Issue
Block a user