public function getThumbnail($path) { $this->ensureAccess($path); $image = new Thumbnail($path); $this->setImageHeaders($path, $image->getType()); $image->downscale(); $image->render(); }