You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HEIC preview fails with 512 MiB Imagick limit despite policy.xml override (fixed by newer ImageMagick/libheif) #2573
Current included Imagick can't decode many larger heic due to bug, package update fixes bug.
Description
HEIC images fail to generate previews in the stock Nextcloud Docker image due to an Imagick memory/security limit at exactly 512 MiB. Increasing ImageMagick policy limits and Nextcloud preview limits does not resolve the issue. Upgrading the ImageMagick/libheif stack inside the container immediately fixes the problem.
Steps to reproduce
Deploy official Nextcloud Docker image
Upload HEIC image (modern phone photo, high resolution)
Trigger preview generation (web UI or background jobs)
Actual behavior
Preview generation fails with:
ImagickException:` Memory allocation error:
Security limit exceeded: Allocating 599270415 bytes exceeds the security limit of 536870912 bytes
@ error/heic.c/IsHEIFSuccess/141
Expected behavior
ImageMagick should respect configured policy.xml limits
HEIC previews should succeed when sufficient memory limits are configured
Update ImageMagick/libheif packages in the base image
Notes
This is reproducible via direct PHP Imagick usage (not specific to Nextcloud)
The error is deterministic and always occurs at 512 MiB allocation threshold
Behavior changes immediately with newer ImageMagick/libheif
Activity
joshtrichards commentedon May 18, 2026
If it lands in Debian Trixie (LTS) we'll presumably get it. Not much we can do really otherwise.
https://tracker.debian.org/pkg/imagemagick