On NixOS, the libheif package provides a `heif-dec` command, which you can use as follows:
heif-dec foo.heic foo.jpg heif-dec foo.heic foo.jpgThey basically consume the libheif command line tool so you install that as a prerequisite.
Gwenview also opens them.
> cat ~/.local/share/kio/servicemenus/convertHEIF.desktop
[Desktop Entry]
Type=Service
MimeType=image/heif;
Actions=convertHEIF
[Desktop Action convertHEIF]
Name=Convert to JPEG
Icon=image-bmp
Exec=/bin/sh -c "heif-dec -q 95 %u $(dirname %u)/$(basename %u .heic).jpg"