HEIC uploads from browser still not working

Platform: Windows 11

Browser, if a website issue: Edge

URLs (aka web addresses) of any relevant observations or pages: Add Observations · iNaturalist

Screenshots of what you are seeing:

Description of problem: Uploading an HEIC file from the browser fails with a “File not supported” error.

There was another topic about this same issue last year, but it was closed after the following comment from an iNaturalist staff member:

“So we looked into fixes for this and it seems like the root issue is that Windows doesn’t really support HEIC very well and there isn’t much we can do about it.”

I did some debugging and it appears that Chromium-based browsers (Chrome, Edge) on Windows do not have a MIME type mapping for HEIC. For HEIC files, file.type returns an empty string, which iNaturalist rejects because it’s not in the list of support MIME types.

I don’t think this is a Windows issue per se, though. Windows 10 and 11 do support HEIC and have for years. They can display them using built-in applications and show previews in File Explorer. At least on my machine, I also do have a MIME type mapping for .heic files in the registry. But the browser doesn’t seem to respect this.

This should be fixable on iNaturalist’s end. It looks like the file upload uses the React-Dropzone component. It should be possible to configure this component to accept files based on extension as well as MIME type, or to just ignore the MIME type check. I will also report this issue to Chromium though.

I agree that this could be good to address, but not sure if it is a Bug Report since the lack of functionality has been accepted by staff, so this Bug Report may be closed.

Note that staff didn’t say Windows doesn’t handle HEIC but that

There’s an existing post on workarounds here

https://forum.inaturalist.org/t/work-around-for-heic-photos-on-windows-10-11/75321

If iNat says that it accepts HEIC files, but there’s no way to upload HEIC files through one of the most common browsers used for iNat, I think that qualifies as a bug, even if it’s a bug that may not be fixed for a while. It’s certainly not working as intended.