Skip to content

fix(media): import, upload, and serve AVIF images - #467

Merged
DavidBabinec merged 1 commit into
mainfrom
fix/avif-media-support
Aug 31, 2026
Merged

fix(media): import, upload, and serve AVIF images#467
DavidBabinec merged 1 commit into
mainfrom
fix/avif-media-support

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

Fixes #408

The bug

AVIF files were filtered out of static imports, misidentified as MP4 during upload sniffing, and served as generic downloads. A reported Webflow import silently lost 353 images.

The fix

Accept AVIF across the import and upload policies, detect its ftyp/avif brand before the broader MP4 signature, generate the existing responsive image ladder, and serve it as image/avif. Regression coverage pins each boundary and the media/import docs now name the supported format.

Verification

production fix removed; targeted tests  # 40 pass, 3 fail
bun test <three regression files>        # 43 pass, 0 fail
bun run build                            # clean, exit 0
bun run lint                             # clean, exit 0
bun test                                 # 6727 pass, 0 fail, exit 0

AVIF was known by extension but excluded from the upload policy, then misclassified by the broad MP4 ftyp signature and served as a generic download.
@DavidBabinec
DavidBabinec marked this pull request as ready for review August 31, 2026 21:09
@DavidBabinec
DavidBabinec merged commit de6695d into main Aug 31, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: AVIF images are dropped on site import and served as application/octet-stream

1 participant