XMB Forum Software

How to handle HEIC

flushedpancake - 7-31-2026 at 06:14 AM

I noticed one of the recent commits that properly defines image formats. This is a good thing (though bitmaps don't tend to be parsed as embeddable in <img> tags, if I'm not mistaken, could be wrong though)

We should probably be converting HEIC to WebP or AVIF, instead of rejecting the format entirely. iOS tends to be extremely schizo about what format to save a photo in for some whatever reason - sometimes it'll convert stuff saved in Safari to JPEG/HEIC/PNG, sometimes it won't, sometimes it'll save photos as JPG, sometimes as HEIC, and there doesn't seem to be any real consistent variable, it's almost entirely random and can't seem to be disabled.

(A problem with Safari that has been around since the original iPhone and is still a problem to this very day, unless you like saving random stuff in the Files app.)

Working around Apple's insistence on not following standards really does give off similar vibes to a certain web browser, doesn't it?

miqrogroove - 7-31-2026 at 08:11 AM

Web browsers have BMP support. That's never been a problem.

The GD library doesn't support HEIC so uploading that format to XMB will be treated as a downloadable attachment with no thumbnail.

miqrogroove - 8-2-2026 at 02:11 PM

Other possible solutions:

- Try to find PHP support for this. It is not included by default, even with better extensions such as gmagick. This is messy and won't work in many environments.

- Provide a separate "Image upload" field with an explicit accept attribute. This forces devices to either convert or exclude unsupported formats. Creates a busy user experience, but I've seen it done in some projects.

- Leave it the way it is. HEIC files are downloadable with no thumbnail.

flushedpancake - 8-2-2026 at 08:33 PM

The second idea could be implemented as a future plugin, perhaps with some extra options. Honestly, posting images in general is somehow one of those things that manages to be quite fumblesome, just because of the fact it doesn't auto-scale huge images not to stretch the screen off the page when you link them through URL.

That said, maybe it would actually be worth considering limiting the file types actually allowed to be uploaded to the board in the first place, since apparently you can upload exe files: (testing with CMD from Windows XP SP2 x64)

Attachment: cmd.exe (380kB)
This file has been downloaded 7 times

We could leave it as it is but maybe do what we do with the avatar upload check, but instead, check specifically for HEIC and throw up a warning that there'll be no thumbnail or in-browser preview if the user selects a HEIC/HEIF file...

miqrogroove - 8-3-2026 at 12:29 AM

Should be core functionality, not a plugin. Configuration details will be less important so maybe plugins could do some of that. But in the meantime, yes it could use an on/off switch at most.

miqrogroove - 8-6-2026 at 08:37 PM

Even my desktop photo editor can't open HEIC files. Not really sure about the next steps yet. Maybe Microsoft Paint doodles can be used for testing. :grin:

flushedpancake - 8-7-2026 at 07:59 PM

I will take any opportunity possible to post random nonsense :singing:

This is now your fault :D

300z300_16color_bmp.bmp - 45kB