HFS-HEIC-Support Plugin for HTTP File Server
HFS-HEIC-Support is a plugin for HTTP File Server version 3 (HFS 3) that provides support for HEIC/HEIF formats. The plugin performs server-side conversion of images to JPG format "on the fly" with intelligent caching, enabling seamless preview through the standard Show function in HFS and thumbnail generation. Perfect for comfortable, ultra-fast browsing with instant flipping through massive HEIC/HEIF file collections.
- Automatic detection of HEIC/HEIF files in the HFS file system
- Seamless conversion to JPG for compatibility with all browsers
- File viewing through standard HFS
Showviewer
- Two-level caching - in memory and on disk
- Cache validation when source files are modified
- Automatic cleanup of expired cache files (TTL configurable: 1 minute - 30 days)
- Pre-conversion of neighboring files for faster navigation
- Thumbnail cache with validity checking
- Configurable JPEG quality (10-100%)
- Pre-conversion control - number of previous/next files (0-100).
0disables pre-conversion, leaving only immediate conversion of the current file - Parallel processing - up to 8 background workers (1-8)
- Integration with
Sharpfor 256px thumbnail generation
- Load balancing between immediate and background workers:
- Priority processing - immediate conversion of requested files
- Background pre-conversion - parallel processing of neighboring files
- Pre-conversion queue for neighboring files is built first for N next files, then for N previous files relative to current file, ensuring fast priority forward browsing
- Minimal blocking of the main HFS thread - all conversions are executed in the workers.
- Automatic worker restart when settings change
- Worker isolation - processing in separate threads
- Error handling - detailed logging of conversion issues
- Graceful shutdown - proper termination during plugin unload including worker cleanup
- Backend: Node.js using
worker_threadsfor multi-threaded processing - Conversion:
heic-convertlibrary based on libheif - Thumbnails via
Sharpplugin for HFS - Visualization: Integration with HFS frontend API for icon display and viewer
- Caching: Two-level system (memory + filesystem) with TTL
- MD5 hashing for file identification in cache
- libheif - HEIC/HEIF conversion library (included in plugin)
- libde265 - HEVC decoder (included in plugin)
- Node.js modules:
heic-convert,heic-decode,jpeg-js,libheif-js,pngjs(included in plugin) Sharpplugin for HFS (installed separately)
-
Memory consumption:
- ~150MB per worker in active mode (up to 250MB peak with JPG quality 50);
- ~100MB per worker in passive mode after conversion;
- ~0-20MB per worker after worker restart during hourly interval cleanup.
-
Recommendation: Number of workers = number of logical CPUs for maximum pre-conversion speed. Corresponds to 100% CPU load. Provides pre-conversion of over 100 files per minute on 8 logical CPUs
-
Optimization: Automatic cache cleanup by TTL every hour + worker restart
- Protection against path traversal and injections
- MIME type and extension validation
- Local processing - conversion performed only on server
- Worker isolation - processing in separate threads
- Copy the plugin folder to the
\pluginsdirectory of your HFS - Activate the plugin through the HFS web interface
- Configure parameters in the Options section
- Open the context menu for a file with
.heicor.heifextension in HFS - Click
Showto view - the plugin will automatically perform conversion - Subsequent views use the cached version
- Single click on HEIC icon → opens in
Showviewer similar to Instant-show plugin - Support for
Auto-playinShow
- Auto-generation of 256px thumbnails (if enabled)
- Thumbnail caching for fast display in lists
- Page refresh required to display thumbnails after generation
- Thumbnails are generated only for files that have successfully undergone conversion/pre-conversion, not for the entire file list in the interface
- Server: HFS API version 12.6+
Sharpplugin: Recommended for thumbnail generation (optional)- Memory: Minimum additional 512MB free RAM for worker operation
- Disk: 1GB for cache files (depends on number of HEIC files)
- For now Windows and Linux only - plugin uses native libheif/libde265 DLL/so libraries. (macOS support could be achieved by adding
libheifandlibde265dylib for macOS tobin) - Memory consumption - each worker requires ~150MB RAM with JPG quality 50. With JPG quality 100 and 8 workers, consumption can reach 6GB during active pre-conversion
- High CPU load during pre-conversion with large number of workers
- JPEG quality - changes require plugin restart
- File list sorting for pre-conversion queue is performed by name only
- Large collections - TTL configuration recommended for disk space management
- Image archives - working with large HEIC collections without pre-conversion
- Shared access - providing access to HEIC files for users without format support
- Traffic optimization - conversion to JPEG for bandwidth savings
- Mobile backups - organizing access to iPhone/iPad photo archives
- Corporate media libraries - unified access to HEIC content for employees
- Photographers - viewing HEIC shots through web interface
Support:
- BTC:
bc1qeuq7s8w0x7ma59mwd4gtj7e9rjl2g9xqvxdsl6 - TON:
UQAOQXGtTi_aM1u54aQjb8QiXZkQdaL9MDSky5LHN0F5-yF2