Closes #21039: Add AVIF support for image attachments #560

Closed
opened 2026-04-05 16:43:24 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @pheus on 1/15/2026

Fixes: #21039

Preserve .avif extensions when uploading Image Attachments (so the attachment is served with the expected filename), and ensure AVIF files are selectable in the UI.

  • Add AVIF (.avif / image/avif) to the list of acceptable image extensions used when generating attachment filenames, so the stored file keeps its extension.
  • Update the image upload widget to explicitly include AVIF in the accept attribute (required for Firefox to offer AVIF files in the file picker).
  • Manual test: upload a AVIF file as an Image Attachment and confirm it’s served at /media/image-attachments/...avif.

Thanks for the review!

*Originally created by @pheus on 1/15/2026* ### Fixes: #21039 Preserve `.avif` extensions when uploading Image Attachments (so the attachment is served with the expected filename), and ensure AVIF files are selectable in the UI. * Add AVIF (`.avif` / `image/avif`) to the list of acceptable image extensions used when generating attachment filenames, so the stored file keeps its extension. * Update the image upload widget to explicitly include AVIF in the `accept` attribute (required for Firefox to offer AVIF files in the file picker). * Manual test: upload a AVIF file as an Image Attachment and confirm it’s served at `/media/image-attachments/...avif`. Thanks for the review!
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#560