Repository navigation
docs: describe imagor format support - #3883
TheOneRing wants to merge 1 commit into
Conversation
|
Label error. Requires at least 1 of: Type:Bug, Type:Enhancement, Type:Feature, Type:Breaking-Change, Type:Test, Type:Documentation, Type:Maintenance, Type:Security, Type:Dependencies, Type:DevOps, dependencies. Found: |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | ✅ 0.00% coverage variation (-1.00%) |
| Diff coverage | ✅ ∅ diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (9e8e3c1) 93323 26549 28.45% Head commit (7dd387b) 93323 (+0) 26545 (-4) 28.44% (0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#3883) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
dschmidt
left a comment
There was a problem hiding this comment.
I would keep this to one sentence in MIGRATION.md and move the format story to the READMEs, because "imagor can support additional formats such as ..." hides more than it says. Here is what I measured, samples POSTed the way webdav does it (multipart with the file's real content type) to shumc/imagor:1.9.11, ghcr.io/cshum/imagor-magick:1.9.11 and the thumbnails service inside opencloudeu/opencloud:dev (Dockerfile.multiarch, Alpine 3.24 with vips vips-magick imagemagick); the pure Go column is what push_imaging.go decodes with.
| Format | webdav announces (built-in) | OC pure Go | OC release image (libvips) | imagor | imagor-magick |
|---|---|---|---|---|---|
| JPEG, PNG, GIF, WebP | yes | yes | yes | yes | yes |
| TIFF | yes | yes | yes | yes | yes |
| BMP | yes | yes | yes (via vips-magick) |
yes | yes |
| ICO | no (output mapping only) | no | yes | no (406) | yes |
| SVG | no | no | yes | yes | yes |
| no | no | no (vips-poppler missing) |
libvips renders it (poppler), but the upload loader rejects application/pdf with its default -upload-loader-accept image/* (406) |
same | |
| HEIC/HEIF, AVIF | no | no | no (vips-heif missing) |
yes | yes |
| JXL | no | no | no (vips-jxl missing) |
yes | yes |
| PSD | no | no | yes | no | yes |
| TGA, PCX, DDS | no | no | not measured | no | yes |
| camera raws (NEF, DNG, ARW, ORF, RW2, CR2) | no | no | no real decode | yes (libraw) | yes |
Why this does not fit into a list of formats:
- Three of the six named formats (TIFF, BMP, WebP) are no gain at all, both of our builds read them today. SVG is a gain only over the pure Go build, which the images do not ship.
- "which generator" is only half of it. Nothing outside the built-in list gets a preview until it is announced through
OC_THUMBNAILS_ADDITIONAL_SOURCE_TYPES, and anything with transparency (SVG, ICO, HEIC) also needsOC_THUMBNAILS_ADDITIONAL_OUTPUT_TYPESmapped toimage/png, otherwise it comes back as a JPEG. - PDF needs a knob on imagor's side as well,
-upload-loader-acceptwidened beyondimage/*, because webdav sends the real content type. - The loaders do not vary between the two imagor images the way "when the corresponding loaders are available in its build" suggests. Both link poppler, libheif, libjxl, librsvg and libraw; only ICO, PSD, TGA and PCX hang on the magick build.
- Our own release image depends on the Alpine package set (
vips-magickfor BMP and ICO, andvips-heif,vips-poppler,vips-jxlwould unlock the rest), so even "what the built-in generator reads" is a property of the image, not of the code.
All of that is operating knowledge someone starting fresh on 9.0 needs too, and they never open MIGRATION.md. The webdav README already documents the three OC_THUMBNAILS_ADDITIONAL_* settings, the table belongs right under them; the thumbnails README already has the "a real imagor" paragraph about -vips-max-width, the -upload-loader-accept note belongs next to it. Both READMEs end up on docs.opencloud.eu, MIGRATION.md does not. The table and the two configuration notes belong in the READMEs, as a follow-up.
| Nothing has to be set in the single binary. The URL may also point at a real | ||
| [imagor](https://imagor.net), which speaks the same endpoint. | ||
| [imagor](https://imagor.net), which speaks the same endpoint. Imagor is an image | ||
| processing server built on libvips; compared with the basic thumbnailer, it can | ||
| support additional formats such as TIFF, BMP, WebP, SVG, PDF, and HEIF/AVIF when | ||
| the corresponding loaders are available in its build. |
There was a problem hiding this comment.
| Nothing has to be set in the single binary. The URL may also point at a real | |
| [imagor](https://imagor.net), which speaks the same endpoint. | |
| [imagor](https://imagor.net), which speaks the same endpoint. Imagor is an image | |
| processing server built on libvips; compared with the basic thumbnailer, it can | |
| support additional formats such as TIFF, BMP, WebP, SVG, PDF, and HEIF/AVIF when | |
| the corresponding loaders are available in its build. | |
| Nothing has to be set in the single binary. The URL may also point at a real | |
| [imagor](https://imagor.net), which speaks the same endpoint and reads more | |
| formats than the built-in generator; which ones, and what has to be configured | |
| for them, is in the [webdav README](README.md). |
Nits folded in: the file writes "imagor" in lowercase and calls the other side "the built-in generator", not "the basic thumbnailer".
No description provided.