Spring 26: Preview stopped for HEIC images

Support intro

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 34.0.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • openSUSE slowroll
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.67
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Apache 2.4.67
  • PHP version (e.g, 8.3):
    • 8.5.7
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After Upgrade to Server 34.0.2
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Distribution
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Yes (mod_security)

Summary of the issue you are facing:

After Upgrade, no previews are generated for HEIC images.

Steps to replicate it (hint: details matter!):

  1. occ preview:generate XXX.heic gives “No preview generator available for file of typeimage/heic”

  2. php -r ‘phpinfo();’ | grep HEIC:
    ImageMagick supported formats => … HEIC,HEIF,…

Log entries (not applicable)

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            XXX
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "34.0.2.1",
        "overwrite.cli.url": "XXX",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "XXX",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "theme": "",
        "loglevel": 3,
        "maintenance": false,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "sendmail",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "logfile": "nextcloud.log",
        "auto_logout": true,
        "app_install_overwrite": {
            "0": "groupfolders",
            "1": "bookmarks_fulltextsearch",
            "4": "files_fulltextsearch_tesseract",
            "5": "memories",
            "6": "video_converter",
            "7": "imageconverter",
            "8": "officeonline",
            "9": "fulltextsearch_elasticsearch",
            "10": "camerarawpreviews",
            "11": "fulltextsearch",
            "12": "keeweb",
            "13": "files_fulltextsearch",
            "14": "extract",
            "15": "files_external_onedrive",
            "16": "dicomviewer",
            "17": "maps",
            "18": "files_zip",
            "19": "metadata",
            "20": "files_archive",
            "21": "facerecognition",
            "22": "workflow_media_converter"
        },
        "overwriteprotocol": "https",
        "enable_previews": true,
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "preview_max_filesize_image": 50,
        "preview_max_memory": 256,
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "preview_office_cl_parameters": " --headless --nologo --nofirststartwizard --invisible --norestore --convert-to png --outdir ",
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\Krita",
            "OC\\Preview\\Movie",
            "OC\\Preview\\Image",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\HEIC"
        ],
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0,
            "password": "***REMOVED SENSITIVE VALUE***",
            "timeout": 1.5
        },
        "logtimezone": "XXX",
        "default_phone_region": "XX",
        "memories.vod.path": "/apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "maintenance_window_start": 1,
        "filesystem_check_changes": 1,
        "memories.exiftool": "\/bin\/exiftool",
        "memories.db.triggers.fcu": true,
        "memories.vod.disable": false,
        "memories.vod.vaapi": true,
        "trashbin_retention_obligation": "auto, 90",
        "simpleSignUpLink.shown": false,
        "memories.gis_type": 1,
        "memories.exiftool_no_local": true
    }
}

Started after an upgrade from what?

Is file on an external storage mount?

I’m having the same issue. Started after upgrading from 34.0.1 to 34.0.2. Not sure if related, but Memories isn’t indexing new HEIC files I add either.

Upgrade from 33.0.6-1.2; file is on local storage (autoupload)

Hi,
We are working on bringing this back, but it was a short-term work-around for a security-related issue with Imagick. To avoid risking users who haven’t updated there system yet, we can’t publicly discuss details, but our next release should have a work-around that brings back previews using Imagick.

5 Likes

@Pfanni Imaginary might be a possible workaround. Unfortunately, I can’t test it myself because I don’t have any HEIC images available.

@nickvergessen By the way, is Imaginary still officially supported or recommended? AIO still includes it, but it seems to have disappeared from the official documentation, apart from the configuration parameters. Maybe I’m wrong, but I seem to remember that older versions of the officaial documentation had a dedicated section about it under Preview configuration

Imaginary is documented here: Server tuning — Nextcloud 34 Administration Manual

Oh, okay. For some reason, I couldn’t find that section when I searched the docs, but maybe it was just me. Anyway, thanks :smiley:

Yeah, not really happy. I am working with tons of HEIC files and not, I cannot view them. Hope it’s gonna be a quick fix release.

The fix has been merged in the codebase of the 34 branch. The next regular release is scheduled for 13 August 2026. There may be an out-of-band update before that if we’re lucky.