public function getClassContentThumbnailAction($filename)
    {
        $base_folder = $this->application->getContainer()->getParameter('classcontent_thumbnail.base_folder');
        $base_directories = array_map(function ($directory) use ($base_folder) {
            return str_replace(
                DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR,
                DIRECTORY_SEPARATOR,
                $directory.'/'.$base_folder
            );
        }, $this->application->getResourceDir());

        File::resolveFilepath($filename, null, array('include_path' => $base_directories));

        if (false === file_exists($filename)) {
            $filename = $this->getDefaultClassContentThumbnailFilepath($base_directories);
        }

        if (false === file_exists($filename) || false === is_readable($filename)) {
            $request = $this->application->getRequest();

            throw new FrontControllerException(sprintf(
                'The file `%s` can not be found (referer: %s).',
                $request->getHost().'/'.$request->getPathInfo(),
                $request->server->get('HTTP_REFERER')
            ), FrontControllerException::NOT_FOUND);
        }

        return $this->createResourceResponse($filename);
    }