owncloud / owncloud/core

Stop using the PNG format for HEIC thumbnails

Open
#41,284 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
8.8k
Forks
2.1k
Avg merge
20h 7m
Merged PRs (30d)
41

Description

Steps to reproduce
  1. enable preview for HEIC files (use the latest Imagick, install php-imagick and enable preview in the config, enabled by default)
  2. upload a HEIC file (photo)
  3. access this file via your web browser
  4. its preview(s) is (are) generated, in the PNG (!) format
Expected behaviour

The preview image(s) should not be created in the PNG format, since this format is not usable for photos at all. In my case, the preview files occupy even more space than the original, large photos themselves (20 GB vs. 19 GB). It seems to me that the e.g. the JPG format would be much more suitable.

Actual behaviour

Thumbnails of any HEIC file/photo are generated in the PNG format.

Note: The reason is that the HEIC.php file that generates these thumbnails extends the Bitmap class which uses only the PNG format and cannot be configured to any other file type easily.

Thank you.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the HEIC.php thumbnail generator and its Bitmap parent, which the issue identifies as forcing PNG output. Trace how HEIC previews are configured and generated, then inspect existing thumbnail tests if available. Done means HEIC previews use a suitable photo format instead of PNG without breaking preview generation.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.