protected function get_thumbnail($path) {
        $thumbnail_fullpath = $this->get_thumbnail_path($path);

        // generate thumbnail if it doesn't exist or caching is disabled
        if (!file_exists($thumbnail_fullpath) || $this->config['images']['thumbnail']['cache'] === false) {
            $this->createThumbnail($path, $thumbnail_fullpath);
        }

        return $thumbnail_fullpath;
    }