Write new thumbnail filenames to parent Image object as well

This commit is contained in:
Aaron van Geffen 2022-07-07 13:55:55 +02:00
parent 086102d007
commit 54fb7ab410

View File

@ -335,6 +335,11 @@ class Thumbnail
{ {
$thumb_selector = $this->width . 'x' . $this->height . $this->filename_suffix; $thumb_selector = $this->width . 'x' . $this->height . $this->filename_suffix;
$this->thumbnails[$thumb_selector] = $filename !== 'NULL' ? $filename : null; $this->thumbnails[$thumb_selector] = $filename !== 'NULL' ? $filename : null;
// For consistency, write new thumbnail filename to parent Image object.
// TODO: there could still be an inconsistency if multiple objects exists for the same image asset.
$this->image->getThumbnails()[$thumb_selector] = $this->thumbnails[$thumb_selector];
return $success; return $success;
} }
else else