Add double-density support to photo thumbnails #28

Merged
Aaron merged 13 commits from improve_thumbs into master 2022-11-27 14:38:22 +01:00
Showing only changes of commit 54fb7ab410 - Show all commits

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