Repository navigation
feat(dev): make previews with imagor and announce heic, heif and avif - #3997
Merged
Merged
Conversation
dschmidt
force-pushed
the
feat/dev-stack-imagor
branch
3 times, most recently
from
October 23, 2026 12:40
77ec108 to
c008131
Compare
The dev stack used the built-in resizer, which reads what Go reads. imagor with libvips reads more, heic and avif among them, and the server speaks the same endpoint either way, so only the generator url changes. The two formats are also added to the announced types, so oc:has-preview and the graph thumbnails relationship say yes for them instead of leaving the web client to guess.
dschmidt
marked this pull request as ready for review
October 23, 2026 12:52
dschmidt
marked this pull request as draft
October 23, 2026 13:01
dschmidt
marked this pull request as ready for review
October 23, 2026 13:03
2 of 7 tasks
kulmann
reviewed
Oct 26, 2026
dschmidt
force-pushed
the
feat/dev-stack-imagor
branch
from
October 26, 2026 08:47
0b53eb8 to
c5abedc
Compare
reva maps .heics and .heifs to image/heic-sequence and image/heif-sequence, and imagor renders the cover image of such a file through libvips the same way it renders a plain heic. Announcing the two types lets has-preview say yes for them, so the viewer opens them. Checked against opencloudeu/opencloud-rolling:daily with imagor 1.9.11 and the Nokia HEIF conformance files: an animation (MIAF005) and a burst (MIAF006) uploaded as .heics and .heifs get has-preview 1 and a jpeg from the preview endpoint at 64 and 1024. A sequence without a primary item (C026, brands msf1/hevc/iso8 only) is refused by libheif, the endpoint answers 404 for it. MIAF requires a cover image, so files from real devices carry one.
kulmann
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The dev stack made previews with the built-in resizer, which reads the formats Go reads. imagor with libvips reads more, and the server speaks the same endpoint either way, so this points
WEBDAV_THUMBNAILS_GENERATOR_URLat an imagor container and adds nothing else to the server.heic,heifandavifare then added to the announced types, sooc:has-previewand the graph thumbnails relationship say yes for them. One name covers both halves: webdav, graph and ocdav all readOC_THUMBNAILS_ADDITIONAL_SOURCE_TYPES, and for an image type it is at the same time the claim that the generator reads it, so the file is handed over untouched instead of being refused.image/heic-sequenceandimage/heif-sequenceare announced too. reva maps.heicsand.heifsto them, and such a file carries a cover image as its primary item next to the frame track (MIAF requires one), which libheif reads like a plain heic. Checked with the Nokia HEIF conformance files: an animation (MIAF005) and a burst (MIAF006) uploaded as.heicsand.heifsgethas-preview1 and a jpeg from the preview endpoint at 64 and 1024. A sequence without a primary item (C026, brandsmsf1/hevc/iso8only) still getshas-preview1 but libheif refuses it ("No or invalid primary item"), the endpoint answers 404 for it.Nothing else needs naming. The formats both resize backends read,
webpandtiffamong them, are in the server's own default list and are already announced and previewed without configuration.Measured against
shumc/imagor:1.9.11, with the multipart part typed the way webdav types it: a real.heic(libheif encoded) and an.avifboth come back as a resized JPEG,200. Then end to end on this stack, uploaded over webdav:has-previewis1for both and the preview answers200at 64, 384 and 1024, asimage/jpeg. Worth knowing for anyone debugging later: with the part left asapplication/octet-streamimagor answers406 unsupported formatfrom its upload loader, not from libvips. And a heic above the 7680 px input limit (an 8256x5504 one, say) is refused with "image is too large" by the server itself.The limits in the service are the ones the built-in resizer uses, so both sides refuse the same requests.
imagor is only called by the server, so it stays out of the traefik network and both server instances join the default one to reach it. That makes the
traefik.docker.networklabel effective for the first time, and it was pointing attraefikwhile docker calls the networkweb_traefik, so traefik picked whichever network it found first and answered504. The label now carries the name docker gives it, without hardcoding the project:${COMPOSE_PROJECT_NAME:-web}_traefik.Needs a server image newer than the merge of opencloud-eu/opencloud#3397, which is what the stack pulls by default (
opencloudeu/opencloud-rolling:daily).Not part of this: the preview app's own format list is compiled in, so a heic shows a thumbnail in the file list but does not open in the viewer yet. That is #4009, stacked on this.