My camera produces photos in .HIF extension, and according to this, I think it's for the potential extended color profile.
The lesser-known variation, HEIX, provides differing features from HEIC. The primary difference is its support for color profiles that extend past 8-bit depth per color channel and chroma subsampling past 4:2:0 (4:2:2 or 4:4:4). Images saved in the HEIX variation use the .hif file extension.
However, uploading such photos to my test Nextcloud selfhosted instance result in the preview not being generated.
Manually changing the extension to .heic will make it work.
I also tried a simple code snippet similar to what I can find that might be responsible to generating preview for HEIC files here, and it looks like it still can properly return the mime as /image/x-heic.
Using a normal .heic photo from my phone, that would upload and genrate preview just fine in Nextcloud, but if I change the extension to .hif, it fails. This makes me think this is the extension check issue, and probably not mime type check.
I tried to trace this myself browsing the code, but I'm not familiar with the structure of this project so I coudn't really find it after a couple hours.
Steps to reproduce
Get any HEIC photo (with .heic extension)
Upload the photo to Nextcloud. This should work, with preview being generated.
Manually change the photo's extension to .hif/HIF
Upload this new file to Nextcloud. This time it should fail.
Expected behavior
Nextcloud should be able to handle .hif/HIF files as it's basically still HEIC images, and it is able to handle it if the file's extension is manually changed to .heic.
Installation method
Community Docker image
Nextcloud Server version
29
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Nginx
Database engine version
SQlite
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Anyone can point me to the module that is responsible to generate previews for photos? I think I can have a look, but I'm kinda lost with the codebase with all the abstraction layers.
⚠️ This issue respects the following points: ⚠️
Bug description
My camera produces photos in
.HIF
extension, and according to this, I think it's for the potential extended color profile.However, uploading such photos to my test Nextcloud selfhosted instance result in the preview not being generated.
.heic
will make it work./image/x-heic
..heic
photo from my phone, that would upload and genrate preview just fine in Nextcloud, but if I change the extension to.hif
, it fails. This makes me think this is the extension check issue, and probably not mime type check.I tried to trace this myself browsing the code, but I'm not familiar with the structure of this project so I coudn't really find it after a couple hours.
Steps to reproduce
.heic
extension).hif/HIF
Expected behavior
Nextcloud should be able to handle
.hif/HIF
files as it's basically still HEIC images, and it is able to handle it if the file's extension is manually changed to.heic
.Installation method
Community Docker image
Nextcloud Server version
29
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Nginx
Database engine version
SQlite
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
Additional info
No response