Caddy Fails To <img> AVIF In file_server Grid Layout

Just imagine this is a bug on Microsoft’s Github or an email to a Maintainer. If you’re not a maintainer, forward this to him.

1. The problem I’m having:

file_server browse + grid layout = images in grid. However AVIFs are not treated like images by Caddy. This is also true for JXL (however no major browser supports JXL), but AVIF is supported by Chromium and Firefox and is a mondern standard image format.

2. Error messages and/or full log output:

No “error.”

3. Caddy version:

v2.10.0-beta.2

4. How I installed and ran Caddy:

apt install caddy
enable and start

a. System environment:

Debian Stable.

b. Command:

n/a - Otherwise functional as per Systemd.

c. Service/unit/compose file:

n/a - Otherwise functional as per Systemd.

d. My complete Caddy config:

This would require me inlining a whole set of files, which I’d prefer not to do, so here’s the critical part, assume the rest is known-as-functional and otherwise noise.

--- {
import tls
import headers
encode zstd gzip
root * /---/
file_server browse {
index /
}
}

I assume there’s no bug@caddy. It’s only Github. Microsoft owns free software, etc. So much for a HTTP server being demonstrably autonomous - Or a project maintainer allowing me to send a patch file directly to him without loading malware. If there is, forward the primary part of this message in reference to attached mailing address.

It looks like .avif is not on the list of file extensions for the image icon: caddy/modules/caddyhttp/fileserver/browse.html at 105eee671c384459de666889be953857a7175afa · caddyserver/caddy · GitHub, so it shows the wrong icon and does not show it in the grid

1 Like

Yeah, easy fix – pull requests welcomed!

1 Like

I have create a PR:

1 Like