Overview
Fess can display thumbnail images in search results. Thumbnail images are generated based on the MIME Type of search results. For supported MIME Types, thumbnail images are generated when displaying search results. Thumbnail generation processes can be configured and added for each MIME Type.
To enable thumbnail image display, log in as an administrator and enable thumbnail display in the General settings.
Supported File Formats
Image Files
| Format | MIME Type | Description |
|---|---|---|
| JPEG | image/jpeg | Photos, etc. |
| PNG | image/png | Transparent images, etc. |
| GIF | image/gif | Including animated GIFs |
| BMP | image/bmp, image/x-windows-bmp, image/x-ms-bmp | Bitmap images |
| TIFF | image/tiff | High-quality images |
| SVG | image/svg+xml | Vector images |
| Photoshop | image/vnd.adobe.photoshop, image/photoshop, application/x-photoshop, application/photoshop | PSD files |
Document Files
| Format | MIME Type | Description |
|---|---|---|
application/pdf | PDF documents | |
| Word | application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document | Word documents |
| Excel | application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Excel spreadsheets |
| PowerPoint | application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation | PowerPoint presentations |
| RTF | application/rtf | Rich text |
| PostScript | application/postscript | PostScript files |
HTML Content
| Format | MIME Type | Description |
|---|---|---|
| HTML | text/html | Generates thumbnails from embedded images in HTML pages |
Required External Tools
Thumbnail generation requires the following external tools. Install them according to the file formats you need to support.
Basic Tools (Required)
| Tool | Purpose | Linux (apt) | Mac (Homebrew) |
|---|---|---|---|
| ImageMagick | Image conversion & resize | apt install imagemagick | brew install imagemagick |
Note
Both ImageMagick 6 (convert command) and ImageMagick 7 (magick command) are supported.
SVG Support
| Tool | Purpose | Linux (apt) | Mac (Homebrew) |
|---|---|---|---|
| rsvg-convert | SVG to PNG conversion | apt install librsvg2-bin | brew install librsvg |
PDF Support
| Tool | Purpose | Linux (apt) | Mac (Homebrew) |
|---|---|---|---|
| pdftoppm | PDF to PNG conversion | apt install poppler-utils | brew install poppler |
MS Office Support
| Tool | Purpose | Linux (apt) | Mac (Homebrew) |
|---|---|---|---|
| unoconv | Office to PDF conversion | apt install unoconv | brew install unoconv |
| pdftoppm | PDF to PNG conversion | apt install poppler-utils | brew install poppler |
For Red Hat-based OS, install the following packages:
PostScript Support
| Tool | Purpose | Linux (apt) | Mac (Homebrew) |
|---|---|---|---|
| ps2pdf | PS to PDF conversion | apt install ghostscript | brew install ghostscript |
| pdftoppm | PDF to PNG conversion | apt install poppler-utils | brew install poppler |
HTML File Thumbnail Images
HTML thumbnail images use images specified or included in the HTML. Thumbnails are searched and displayed in the following order:
The content value of a meta tag with name attribute “thumbnail”
The content value of a meta tag with property attribute “og:image”
An appropriately sized image from an img tag
Configuration
Configuration File
The thumbnail generator is configured in fess_thumbnail.xml.
Main Configuration Items (fess_config.properties)
The following items can be configured in app/WEB-INF/classes/fess_config.properties or /etc/fess/fess_config.properties.
generate-thumbnail Script
Overview
generate-thumbnail is a shell script that performs actual thumbnail generation. When installed via RPM/Deb packages, it is installed at /usr/share/fess/bin/generate-thumbnail.
Usage
Arguments
| Argument | Description | Example |
|---|---|---|
type | File type | image, svg, pdf, msoffice, ps |
url | Input file URL | file:/path/to/file.jpg |
output_file | Output file path | /var/lib/fess/thumbnails/_0/_1/abc.png |
mimetype | MIME type (optional) | image/gif |
Supported Types
| Type | Description | Tools Used |
|---|---|---|
image | Image files | ImageMagick (convert/magick) |
svg | SVG files | rsvg-convert |
pdf | PDF files | pdftoppm + ImageMagick |
msoffice | MS Office files | unoconv + pdftoppm + ImageMagick |
ps | PostScript files | ps2pdf + pdftoppm + ImageMagick |
Examples
Thumbnail Storage Location
Default Path
or
Directory Structure
Thumbnails are stored in a hash-based directory structure.
Disabling Thumbnail Job
To disable the thumbnail job, configure the following:
In the administration screen under System > General, uncheck “Display Thumbnails” and click the “Update” button.
Set
thumbnail.crawler.enabledtofalseinapp/WEB-INF/classes/fess_config.propertiesor/etc/fess/fess_config.properties.
Restart the Fess service.
Troubleshooting
Thumbnails Not Being Generated
Check external tools
Check logs
Run script manually
Errors with GIF/TIFF Files
When using ImageMagick 6, specify the MIME type to enable format hints. This is done automatically if Fess is configured correctly.
Error example:
Solutions:
Upgrade to ImageMagick 7
Or verify that MIME type is being passed correctly
SVG Thumbnails Not Being Generated
Check if
rsvg-convertis installed
Test conversion manually
Permission Errors
Check permissions on the thumbnail storage directory.
Fix permissions if necessary.
Platform Support
| Platform | Support Status | Notes |
|---|---|---|
| Linux | Fully supported | - |
| macOS | Fully supported | Install external tools via Homebrew |
| Windows | Not supported | Due to bash script dependency |