Conversation
There was a problem hiding this comment.
Pull request overview
Adds default indexing + HTTP serving support for common iOS-related formats (HEIC/HEIF and Live Photo MOV) plus GIF, relying on FFmpeg for decoding when available. Contributes to #52 (iOS Live Photo support).
Changes:
- Register additional MIME types for
.heic,.heif,.gif, and.mov. - Extend default config to index/recognize HEIC/HEIF/GIF images and MOV videos.
- Update runtime/dependency docs and Docker image dependencies; add an unreleased changelog entry.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| main.go | Adds MIME mappings for HEIC/HEIF/GIF/MOV. |
| docs/dependencies.md | Documents FFmpeg as the dependency enabling these formats (with version guidance). |
| defaults.yaml | Adds .heic, .heif, .gif, .mov to default indexed extensions and image/video extension lists. |
| Dockerfile | Updates Alpine base and documents/install runtime deps including FFmpeg. |
| .changes/unreleased/heic-support.md | Adds unreleased changelog entry announcing the new format support. |
| mime.AddExtensionType(".heic", "image/heic") | ||
| mime.AddExtensionType(".heif", "image/heif") | ||
| mime.AddExtensionType(".gif", "image/gif") | ||
| mime.AddExtensionType(".mov", "video/quicktime") |
There was a problem hiding this comment.
These new MIME registrations are inside if apiPrefix != "/" (the UI+API mode). In apiPrefix == "/" (API-only) mode they won’t run, so http.ServeFile for originals (e.g., /files/{id}) may still respond with application/octet-stream for HEIC/HEIF/GIF/MOV. Consider moving the relevant mime.AddExtensionType calls outside this conditional (or duplicating them for API-only) so content-types are correct in both modes.
Dockerfile
Outdated
|
|
||
| # Install runtime dependencies | ||
| # - exiftool: metadata extraction | ||
| # - ffmpeg: video thumbnails, HEIC/HEIF/MOV/GIF support (8.0.1+ includes HEVC decoder) |
There was a problem hiding this comment.
The FFmpeg version guidance here ("8.0.1+ includes HEVC decoder") doesn’t match the docs (which recommend v7.0+) and may be inaccurate since HEVC support depends on how FFmpeg is built (codecs enabled), not just the version. Consider rewording to describe the required codec support (HEVC/H.265 + libheif) and keeping version recommendations consistent across docs and Dockerfile comments.
| # - ffmpeg: video thumbnails, HEIC/HEIF/MOV/GIF support (8.0.1+ includes HEVC decoder) | |
| # - ffmpeg: video thumbnails, HEIC/HEIF/MOV/GIF support (requires build with HEVC/H.265 decoder + libheif; FFmpeg 7.0+ recommended, see docs) |
|
|
||
| - [ExifTool]: Extracts metadata from many more formats than the embedded [goexif]. | ||
| - [FFmpeg]: Generates video thumbnails and previews and adds support for more image formats (even basic RAW). | ||
| - [FFmpeg]: Generates video thumbnails and previews and adds support for more image formats including HEIC/HEIF (iOS photos), MOV (QuickTime videos), and basic RAW formats. **(v7.0+ recommended)** |
There was a problem hiding this comment.
This adds a specific FFmpeg version recommendation, but the Dockerfile comment references a different version. Consider keeping version guidance consistent across the repo (or avoiding a specific version and instead documenting the required codec support for HEIC/HEIF/MOV).
| - [FFmpeg]: Generates video thumbnails and previews and adds support for more image formats including HEIC/HEIF (iOS photos), MOV (QuickTime videos), and basic RAW formats. **(v7.0+ recommended)** | |
| - [FFmpeg]: Generates video thumbnails and previews and adds support for more image formats including HEIC/HEIF (iOS photos), MOV (QuickTime videos), and basic RAW formats. |
.changes/unreleased/heic-support.md
Outdated
| time: 2026-01-25T21:00:00Z | ||
| --- | ||
|
|
||
| HEIC (High Efficiency Image Container), HEIF (High Efficiency Image Format), GIF, and MOV (QuickTime) files are now fully supported. These formats, commonly used by iOS devices and other platforms, are decoded using FFmpeg when available. The extensions `.heic`, `.heif`, `.gif`, and `.mov` are now included in the default configuration, so Photofield will automatically index and display these files alongside your other media. |
There was a problem hiding this comment.
The first sentence says these formats are "fully supported", but the next sentence makes support conditional on FFmpeg being available. Consider rephrasing to avoid implying unconditional support (e.g., "supported when FFmpeg is installed/available").
| HEIC (High Efficiency Image Container), HEIF (High Efficiency Image Format), GIF, and MOV (QuickTime) files are now fully supported. These formats, commonly used by iOS devices and other platforms, are decoded using FFmpeg when available. The extensions `.heic`, `.heif`, `.gif`, and `.mov` are now included in the default configuration, so Photofield will automatically index and display these files alongside your other media. | |
| HEIC (High Efficiency Image Container), HEIF (High Efficiency Image Format), GIF, and MOV (QuickTime) files are now supported when FFmpeg is available. These formats, commonly used by iOS devices and other platforms, are decoded using FFmpeg. The extensions `.heic`, `.heif`, `.gif`, and `.mov` are now included in the default configuration, so Photofield will automatically index and display these files alongside your other media when FFmpeg is installed. |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Co-authored-by: SmilyOrg <1451391+SmilyOrg@users.noreply.github.com>
Co-authored-by: SmilyOrg <1451391+SmilyOrg@users.noreply.github.com>
Co-authored-by: SmilyOrg <1451391+SmilyOrg@users.noreply.github.com>
Co-authored-by: SmilyOrg <1451391+SmilyOrg@users.noreply.github.com>
Introduce support for HEIC, HEIF, GIF, and MOV formats, enhancing media compatibility. FFmpeg integration allows for decoding these formats, which are commonly used on iOS devices. The default configuration now includes these extensions for automatic indexing and display in Photofield.
Contributes to #52