fix serve only for non-thumbs
authorAlan Knowles <alan@roojs.com>
Mon, 24 May 2021 06:03:00 +0000 (14:03 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 24 May 2021 06:03:00 +0000 (14:03 +0800)
Images.php

index bfda282..884d88a 100644 (file)
@@ -297,6 +297,10 @@ class Pman_Core_Images extends Pman
             $this->as_mimetype  = $img->mimetype;
         }
         if (!$this->thumb) {
+            if ($x->mimetype == $this->as_mimetype) {
+                $x->serveOnly($this->method);
+                exit;
+            }
             $x->convert( $this->as_mimetype);
             $x->serve($this->method);
             exit;