Stop using the PNG format for HEIC thumbnails
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 8.8k
- Forks
- 2.1k
- Avg merge
- 20h 7m
- Merged PRs (30d)
- 41
Description
Steps to reproduce
- enable preview for HEIC files (use the latest Imagick, install php-imagick and enable preview in the config, enabled by default)
- upload a HEIC file (photo)
- access this file via your web browser
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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