Skip to content

Image field does not render avif files  #6629

@Vinimaks

Description

@Vinimaks
  • Laravel Version: 11.36.1
  • Nova Version: 5.0.4
  • PHP Version: 8.3.8
  • Database Driver & Version: Mysql 8
  • Operating System and Version: Ubuntu 22.04.1
  • Browser type and version: Google Chrome 112.0.5615.165
  • Reproduction Repository: N/A

Description:

The Image field accepts .avif file format and displays them properly in the Index and Detail views but when they are viewed in the Create or Edit mode, they show as a generic icon. Other image formats like .png show in all views just fine. This issue appears to exist regardless if using public disk or s3.

Basically, it's exactly the same issue as fixed .webp and it is also easily solved by simply adding image/avif to const imageTypes in vendor/laravel/nova/resources/js/composables/useFilePreviews.js

Detailed steps to reproduce the issue on a fresh Nova installation:

  1. Add an Image field to any resource.
  2. Upload a .avif file.
  3. View the generic icon in Create and Edit views.

Metadata

Metadata

Assignees

Labels

bugVerified bug by the Nova teamfix incomingA fix is in review

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions