Welcome Guest, Not a member yet? Register   Sign In
Add AVIF and HEIF MIME types to Config/Mimes.php
#1

(This post was last modified: 10-18-2023, 01:47 AM by Muzikant.)

Hi. I am using \CodeIgniter\Files\File\guessExtension() to identify, if a file is an image and this function is also based on MIME types. I realized, an AVIF type is not in the Config\Mimes.php file. This image format is included in Mozilla's common image file types. As it is more and more popular now, what about including it?

AVIF MIME types (Wikipedia / right column):
Code:
image/avif


There is also missing HEIF type, which is commonly used on Apple devices. It is not open format (HEIF patent licensing), but as there are CDR and AI formats, it should not be a problem. This format is also widely used, so what about including it too?

HEIF MIME types (Wikipedia / right column):
Code:
image/heif, image/heif-sequence;
image/heic, image/heic-sequence;
image/avif

Yes, there is an image/avif in HEIF too, but this should be an identifier for AVIF format (Wikipedia is not perfect).
Reply


Messages In This Thread
Add AVIF and HEIF MIME types to Config/Mimes.php - by Muzikant - 10-18-2023, 01:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB