docker icon indicating copy to clipboard operation
docker copied to clipboard

Preview generation for iOS 18 HEIC photos do fail

Open 2b2bff opened this issue 1 year ago • 9 comments

Even with the newest image containing Nextcloud 30.0.2 the preview of the photos captured with iOS 18 are missing. Funnily enough there is a message that you should not use Imaginary as it has known issues with HEIC files.

The issue is fixed with an upgraded libheif (1.18.0 includes the needed change) and an ImageMagick version compiled against it.

More information about this (in German) under https://decatec.de/home-server/nextcloud-fehlerhafte-bildanzeige-von-heic-bildern-beheben-ios-ipados-18/

2b2bff avatar Nov 10 '24 17:11 2b2bff

Which image are you referring to? Keep in mind we have multiple variants (Debian, Alpine)? Though I suppose it doesn't change the end result.

Our Alpine images will likely pick up libheif 1.18.x in 30-60 days when Alpine 3.21 is published.

For our Debian (Bookworm) images this is a bit trickier.

Funnily enough there is a message that you should not use Imaginary as it has known issues with HEIC files.

I believe this is no longer true. That's my understanding since nextcloud/server#37140 was merged. I think the upstream docs need to be updated.

joshtrichards avatar Nov 10 '24 21:11 joshtrichards

Surprisingly, (perhaps because there was also a debian bug ticket), a backported release of libheif is available for bookworm.

However, there seems to be no activity in Imagemagick, one of the most important things. Perhaps because it is statically linked, the problem may still not be resolved?

(This issue is related to nextcloud/server#47289)

hinaloe avatar Nov 15 '24 19:11 hinaloe

Even the official all-in-one image has no support for the new HEIC, yet...

2b2bff avatar Nov 15 '24 21:11 2b2bff

Even the official all-in-one image has no support for the new HEIC, yet...

It will automatically be included as soon as alpine which the containers are based on includes the new libheif binary

szaimen avatar Nov 17 '24 16:11 szaimen

What are the chances of Debian-based images getting iOS 18 HEIC photo support? Should the dockerfile maybe build imagemagic with the new libheif version?

vnescape avatar Nov 20 '24 19:11 vnescape

Even the official all-in-one image has no support for the new HEIC, yet...

It will automatically be included as soon as alpine which the containers are based on includes the new libheif binary

The AIO containers were just update to Alpine v3.21 which is now released with v10.2.0 Beta. Testing and feedback is welcome! See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel

szaimen avatar Dec 20 '24 12:12 szaimen

Alpine images have been bumped to 3.21:

https://github.com/nextcloud/docker/releases/tag/v2025.1.1

joshtrichards avatar Jan 19 '25 14:01 joshtrichards

For those building custom Nextcloud images based on the official image, you can resolve this by updating libheif from Debian backports:

Dockerfile:

FROM nextcloud:latest
RUN set -ex; \
    echo 'deb http://deb.debian.org/debian bookworm-backports main' >> /etc/apt/sources.list; \
    apt-get update; \
    apt-get install -y --no-install-recommends libheif1/bookworm-backports; \
    rm -rf /var/lib/apt/lists/*

docker-compose.yml:

app:
  build: .
  # image: nextcloud

This pulls the newer libheif version and resolves the issue globally for your instance.

Simply bring your stack up with

docker compose up --build

qdrop17 avatar Jun 07 '25 09:06 qdrop17

While qdrop17's solution for custom Docker images worked for me there were still about 5% of photos/videos (primarly HEIC) that still did not have previews generated. What fixed it is I moved them to new directory A, copied them from A to new directory B, deleted directory A and moved all from directory B to original directory.

executed avatar Oct 14 '25 13:10 executed