Piwigo icon indicating copy to clipboard operation
Piwigo copied to clipboard

Synchronize tool does not find heic files Release 14

Open tfagart opened this issue 2 years ago • 2 comments

Hello,

After having upgraded piwigo in release 14.0 (docker), I've tried to add heic files and then synchronise.

Files are not find by the synchronise tool.

Thanx

Regards

tfagart avatar Dec 27 '23 09:12 tfagart

I can confirm I'm seeing the same behavior in v14 and v15. It seems like during a manual sync, there's no call out to ImageMagick to do the "conversion" of the HEIC image to a JPG for the thumbnail/representatives. When doing an upload, the "convert" call is visible in the log:

[2024-09-11 20:00:44] [INFO] upload_file_heic, exec = convert -sampling-factor 4:2:0 -quality 85 -interlace JPEG -colorspace sRGB -auto-orient +repage -resize "2484x1863>" "/mnt/piwigo/_piwigo-sites/piwigo-beta/upload/2024/09/11/20240911200044-a4f8fa6e.heic" "././upload/2024/09/11/pwg_representative/20240911200044-a4f8fa6e.jpg" 2>&1

There's no such log entry during a manual sync. And there doesn't seem to be anything in the batch manager (or elsewhere) to "force" a generation of the thumbnails of "broken" images like this after they are synced into the album.

jradwan avatar Sep 12 '24 00:09 jradwan

We have 2 different problems here.

  1. heic file extension needs to be in the $conf['file_ext'] array. It is the case, by default, in Piwigo 14. If you have that, then the synchronization should find the HEIC files. In the following example, the first image is an HEIC file. The others are JPEG files:
Screenshot 2024-09-12 at 10 11 28
  1. The synchronization mecanism does not generate pwg_representative files (ie "preview"). That is perfectly what it expected from the sync : going as fast as possible. Generating representative images is slow. So it's not included in the sync. There nothing new or specific to HEIC files. It has always been this way with other "non visible on web browser" files, like videos or TIF files.

What is indeed problematic is that there is no way in Piwigo to re-generate the representative. I agree we should have that action in the Batch Manager.

For now, you can add your own pwg_representative for each HEIC file, before any sync.

plegall avatar Sep 12 '24 08:09 plegall