HEIC Import not longer working

When I try to import HEIC/HEIF images into Shotwell, I get a message saying that the format is not supported. I tried this with a new installation of either EOS and CachyOS. libheif and gdk-pixbuf2 are installed. I can see and open the HEIC files in Nautilus. Shotwell even displays my older, previously imported HEIC files, but I can’t add any new files. Any suggestions?

Shotwell 0.32.13

libheif 1.202-3.1

gdk-pixbuf2 2.44.4-1.1

Log-File for Drag-and-Drop and Import from Directory:

L 88105 2025-11-02 17:11:41 [MSG] main.vala:266:   AVIF   : yes, gdk-pixbuf, yes meta-data
L 88105 2025-11-02 17:11:41 [MSG] main.vala:267:   HEIF   : yes, gdk-pixbuf, yes meta-data
L 88105 2025-11-02 17:11:41 [DBG] main.vala:269: 0,429288 seconds to Gtk.main()
L 88105 2025-11-02 17:12:02 [DBG] LibraryWindow.vala:848: failed to retrieve SelectionData
L 88105 2025-11-02 17:12:03 [DBG] VideoReader.vala:72: Skipping test.HEIC, unsupported mime type image/heif
L 88105 2025-11-02 17:12:03 [DBG] VideoReader.vala:72: Skipping test.HEIC, unsupported mime type image/heif
L 88105 2025-11-02 17:12:03 [DBG] BatchImport.vala:2006: Importing /home/USER/Bilder/2025/05/07/test.HEIC
L 88105 2025-11-02 17:12:03 [DBG] GdkSupport.vala:145: Pixbuf detected format name: heic
L 88105 2025-11-02 17:12:03 [DBG] BatchImport.vala:2026: Deleting failed imported copy /home/USER/Bilder/2025/05/07/test.HEIC
L 88105 2025-11-02 17:12:03 [DBG] BatchImport.vala:632: Import complete after 0,568819

Currently the debug logging does not log the reason why the HEIC import failed — see 2nd and 3rd line from the bottom in above log.

It would be great if a line like debug("Import result %s", result.to_string()); could be added in BatchImport.vala near line 2026 to log the reason it failed: https://gitlab.gnome.org/GNOME/shotwell/-/blob/master/src/BatchImport.vala?ref_type=heads#L2026

Or how else can we read the result value?

(Patching Shotwell isn’t possible as the build fails with it looking for GLIBC 2.38 for some unknown reason, by the system has GLIBC 2.42. Error ”/usr/bin/ld: /tmp/ccHP3gJf.ltrans9.ltrans.o: undefined reference to symbol ‘fmod@@GLIBC_2.38GLIBC_2.38’”)

Hm interesting, heif should work with either glycin or the old libheif loader. As for the fmod error, there’s a -lm missing, the patch should be on the shotwel-0.32 branch

Thanks for the hint, I can rebuild 0.32.13 now with this applied: build: Link to libm if needed (!96) · Merge requests · GNOME / shotwell · GitLab

When importing a sample HEIC file from HEIC sample file gallery | Download HEIC images it fails with UNSUPPORTED_FORMAT. Just the relevant log lines:

[WRN] BatchImport.vala:1871: Unable to read metadata for /home/jake/TEST/shelf-christmas-decoration.heic (corrupted image metadata): continuing to attempt import
[DBG] GdkSupport.vala:145: Pixbuf detected format name: heic
[DBG] BatchImport.vala:2026: Import result: Unsupported file format

Is the corrupted image metadata warning relevant? Would that cause the HEIC file from not being imported with the Unsupported file format result?


That warning happens here src/photos/PhotoMetadata.vala · master · GNOME / shotwell · GitLab . Calling exiv2 command on the same file gives the same message:

$ exiv2 shelf-christmas-decoration.heic
Exiv2 exception in print action for file shelf-christmas-decoration.heic:corrupted image metadata

Nevermind the “corrupted image metadata”. That’s a goose chase. I tried with different HEIC sample files, from HEiC Format Image Sample - Download & Test HEiC Files and https://filesamples.com/formats/heic, and these do not give the exiv2 “corrupted image metadata” error. exiv2 can read them fine but still Shotwell can’t import these files.

[MSG] main.vala:257: Supported codecs....
[MSG] main.vala:258:   WEBP   : yes, builtin
[MSG] main.vala:259:   RAW    : yes, builtin
[MSG] main.vala:260:   CR3    : yes
[MSG] main.vala:261:   JPEG   : yes, gdk-pixbuf
[MSG] main.vala:262:   PNG    : yes, gdk-pixbuf
[MSG] main.vala:263:   GIF    : yes, gdk-pixbuf
[MSG] main.vala:264:   TIFF   : yes, gdk-pixbuf
[MSG] main.vala:265:   JPEG XL: yes, gdk-pixbuf, yes meta-data
[MSG] main.vala:266:   AVIF   : yes, gdk-pixbuf, yes meta-data
[MSG] main.vala:267:   HEIF   : yes, gdk-pixbuf, yes meta-data
[DBG] main.vala:269: 0,145688 seconds to Gtk.main()
[DBG] VideoReader.vala:72: Skipping image1.heic, unsupported mime type image/heif
[DBG] VideoReader.vala:72: Skipping sample1.heic, unsupported mime type image/heif
[DBG] VideoReader.vala:72: Skipping image1.heic, unsupported mime type image/heif
[DBG] VideoReader.vala:72: Skipping sample1.heic, unsupported mime type image/heif
[DBG] BatchImport.vala:2006: Importing /home/jake/Pictures/2025/11/08/sample1.heic
[DBG] BatchImport.vala:2006: Importing /home/jake/Pictures/2025/11/08/image1.heic
[DBG] GdkSupport.vala:145: Pixbuf detected format name: heic
[DBG] BatchImport.vala:2026: Import result for '/home/jake/Pictures/2025/11/08/sample1.heic': Unsupported file format
[DBG] BatchImport.vala:2027: Deleting failed imported copy /home/jake/Pictures/2025/11/08/sample1.heic
[DBG] GdkSupport.vala:145: Pixbuf detected format name: heic
[DBG] BatchImport.vala:2026: Import result for '/home/jake/Pictures/2025/11/08/image1.heic': Unsupported file format
[DBG] BatchImport.vala:2027: Deleting failed imported copy /home/jake/Pictures/2025/11/08/image1.heic
[DBG] BatchImport.vala:632: Import complete after 0,265227

I can confirm that. Import still fails after removing all Exif-Data from the HEIC-File.

I fixed the issue in Fix import of HEIF image files (!100) · Merge requests · GNOME / shotwell · GitLab

The cause is Shotwell is expecting GdkPixbuf to return the name “heif” for HEIF image files but with GNOME 49 it returns the name “heic”. So from_pixbuf_name () would report HEIF image files as unknown file format.

Dump all known file format names and extensions:

#!/usr/bin/python3
import gi
gi.require_version('GdkPixbuf', '2.0')
from gi.repository import GdkPixbuf
for f in GdkPixbuf.Pixbuf.get_formats():
	print(f.get_name(), f.get_extensions())

On Arch Linux with gdk-pixbuf 2.44.4 and glycin 2.0.5 for HEIF files that shows the name to look for is “heic”:

heic [‘heic’, ‘heif’]

After adding support for the “heic” name my Shotwell can import all HEIF sample images without problem.

Thanks! Works like a charm :grinning_face:

Thanks for digging. Weird that it did not pop up in my tests but maybe I have the libheif loader still lying around :confused:

That’s likely it. On Arch Linux (and Fedora 43) libheif no longer includes the pixbuf loader (builds with WITH_GDK_PIXBUF=OFF) but not every distro shipping GNOME 49 may have followed the recommendation in this release to prefer glycin as pixbuf loader.