#1 2025-04-14 19:31:55

banditsc
Member
2025-03-03
8

HEIC Issues

Hello.. I have been thru a lot of the posts on HEIC but haven't been able to get it work yet.. For the test, I uploaded a HEIC file from the phone app and the debug log shows this, and that is basically all. The file then shows up in the album as a Unknown HEIC file. I have tried ext_imagick, imagick, auto, and nothing at all.

[2025-04-14 17:21:13][exec=UdoUrJf6sc]    [INFO]    upload_file_heic, exec = convert -sampling-factor 4:2:0 -quality 85 -interlace JPEG -colorspace sRGB -auto-orient +repage -resize "2484x1863>" "/home/pcapepsd/public_html/photoalbum/upload/2025/04/14/20250414132113-6c03a0ab.heic" "././upload/2025/04/14/pwg_representative/20250414132113-6c03a0ab.jpg" 2>&1


Below is the pertinent parts of the config file:

$conf['upload_form_all_types'] = true;
$conf['graphics_library'] = 'ext_imagick';
$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. \\(\\)\\~\\&]+$/';
$conf['enable_formats'] = true;
$conf['file_ext'] = array_merge(
  $conf['picture_ext'],
  array('tif','tiff','mp4','m4v','mpg', 'mov','ogg','ogv','webm','webmv','avi', 'mp4','jpg','jpeg','png','gif','heic')
  );
$conf['pdf_represenative_ext'] = 'png';
$conf['format_ext'] = array('jpg', 'cr2', 'zip', 'heic', 'HEIC');

Shared Hosting
Piwigo 15.5.0
Operating system: Linux
PHP: 8.3.19
MySQL: 10.6.21-MariaDB-cll-lve-log
Graphics Library: External ImageMagick 6.9.13-25

Thanks

Offline

 

#2 2025-04-14 20:03:25

derrickpeavy
Member
Beaverton, OR, USA
2020-01-03
10

Re: HEIC Issues

Do you have an info.php page where you can confirm that the imagick extension is installed and used?

Offline

 

#3 2025-04-14 20:06:08

banditsc
Member
2025-03-03
8

Re: HEIC Issues

Well actually I found another thread while also troubleshooting MOV issues.

If I set this "$conf['upload_form_all_types'] = true;"  to false then HEIC files convert to jpg.

But with that set to false, I can no longer upload mov files from the app. The app, or at least the android app wasn't converting mov files to a playable format anyways, which is another issue.

So what are my options here? I can either support HEIC files and not be able to upload MOV files, both of which are the IOS default, or not support HEIC and allow MOV uploads, which are not playable.

Offline

 

#4 2025-04-14 20:07:18

banditsc
Member
2025-03-03
8

Re: HEIC Issues

Yes, I confirmed with PHPInfo that HEIC is there and enabled.

Offline

 

#5 2025-04-15 00:18:11

banditsc
Member
2025-03-03
8

Re: HEIC Issues

Seems I can only upload HEIC files from the Android app, which apparently has a bug that doesn't rotate the files correctly, and that only works if I set $conf['upload_form_all_types'] = false;.

If I want to use the website upload I have to set that to true. When I do that it does not convert the heic to jpg and it just shows unknown type. If I leave it set to false and you use the web upload, the upload happens then it just freezes where I'm assuming the conversion would happen.

Is there any reliable method of using HEIC?

Offline

 

#6 2025-04-15 00:25:41

derrickpeavy
Member
Beaverton, OR, USA
2020-01-03
10

Re: HEIC Issues

My environment:

Piwigo 15.5.0 Check for upgrade
Installed on 5 April 2025, 1 week 2 days ago
Operating system: Linux
PHP: 8.3.19 (Show info) [2025-04-14 22:23:38]
MySQL: 8.0.41-0ubuntu0.22.04.1 [2025-04-14 18:23:38]
Graphics Library: External ImageMagick 6.9.11-60
Cache size 16.93 Mo   calculated 22 seconds ago Refresh


My config settings:

<?php

/* The file does not exist until some information is entered
below. Once information is entered and saved, the file will be created. */

$conf['upload_form_all_types'] = true;

$conf['enable_formats'] = true;

$conf['format_ext'] = array('heic','jpg','zip');

$conf['graphics_library'] = 'ext_imagick';

$conf['ext_imagick_dir'] = '/usr/bin/';

$conf['file_ext'] = array_merge(
  $conf['picture_ext'],
  array('jpg','jpeg','png','gif','heic','mov','mp4','m4v')
  );


?>


If I upload from my laptop, through the Piwigo interface, it uploads HEIC no problem, I get image previews, etc.  All is good.

If I upload via FTP (SFTP) which is my preferred, the HEIC files have no preview and are not visible at all on the web. Very, very, very frustrating.

Offline

 

#7 2025-04-15 20:13:26

banditsc
Member
2025-03-03
8

Re: HEIC Issues

My latest is I found the GD ext Imagick doesn't have HEIC enabled on it, it's shared hosting so probably going to be a fight.

The PHP version of Imagick does have HEIC enabled, but if I set Piwigo to use the PHP version of Imagick it doesn't kick off the conversion process, it only does that with ext_imagick.

So is this a bug with Piwigo, or is HEIC only supported with ext_imagick?

Offline

 

#8 2025-04-16 15:06:56

banditsc
Member
2025-03-03
8

Re: HEIC Issues

My webhost NameCheap, says that CloudLinux doesn't support libheif so they can't add HEIC support to the GD version of Imagick. Doesn't sound correct to me, but there support has also been less then stellar.

So my only option now is move to another webhost or if there is any way to make the PHP version of Imagick work with Piwigo.

Offline

 

#9 2025-04-16 17:48:30

pjgaus
Member
Pittsburgh, PA
2015-12-23
17

Re: HEIC Issues

I solved the problem the easy way.  I configured the iPhone to save images in the jpg format.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact