You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[_]: fix/preview the HEIC photos of recent iPhones - #2274
HEIC photos taken with recent iPhones could not be previewed: the viewer showed "No preview available" because the library used to convert them (heic2any, unmaintained since 2023) does not support their format (ERR_LIBHEIF format not supported). The conversion now uses heic-to, which ships a recent libheif, and outputs JPEG.
Related Issues
N/A
Related Pull Requests
N/A
Checklist
Changes have been tested locally.
Unit tests have been written or updated as necessary.
The code adheres to the repository's coding standards.
Relevant documentation has been added or updated.
No new warnings or errors have been introduced.
SonarCloud issues have been reviewed and addressed.
QA Passed
Testing Process
Opened HEIC photos from a recent iPhone in the viewer: they failed with ERR_LIBHEIF format not supported before the change.
Unit tests cover the conversion to JPEG and the fallback when a HEIC file cannot be converted.
Additional Notes
Replaces the heic2any dependency with heic-to.
Summary by CodeRabbit
Bug Fixes
Improved HEIC image previews by converting them to JPEG for display.
When conversion fails, the viewer now reports the error instead of presenting the image as successfully converted.
No actionable comments were generated in the recent review.
Walkthrough
HEIC preview conversion now uses heic-to to produce JPEG output at quality 0.92. The tests check successful conversion and verify error handling when conversion is rejected.
Changes: HEIC preview conversion
Layer / File(s)
Summary
HEIC conversion and validation package.json, src/app/drive/components/FileViewer/viewers/FileImageViewer/useDisplayableImage.ts, src/app/drive/components/FileViewer/viewers/FileImageViewer/FileImageViewer.test.tsx
The dependency changes from heic2any to heic-to. The preview hook requests JPEG output at quality 0.92. Tests check JPEG conversion and verify that a rejection calls onError without reporting converted content.
This change switches HEIC preview conversion to a library with newer HEIC support so recent iPhone photos can preview as JPEG. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix/preview the HEIC photos of recent iPhones" matches the main change. The PR replaces heic2any with heic-to so HEIC photos from recent iPhones can be previewed. The title uses a branch-st…
Description check
The description explains the problem ("No preview available" for HEIC photos from recent iPhones, caused by heic2any not supporting the format), the fix (heic-to with JPEG output), and the testing per…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix/preview the HEIC photos of recent iPhones" matches the main change. The PR replaces heic2any with heic-to so HEIC photos from recent iPhones can be previewed. The title uses a branch-style "fix/" prefix and a bracketed placeholder-like "[_]:" marker, which add noise but do not hide the meaning.
Full details: Description check
Explanation
The description explains the problem ("No preview available" for HEIC photos from recent iPhones, caused by heic2any not supporting the format), the fix (heic-to with JPEG output), and the testing performed. All template sections are present. Related Issues and Related Pull Requests are marked N/A. Three checklist items are unchecked: documentation, SonarCloud review, and QA. The Testing Process section lists local testing and unit tests but gives no details on the test configuration. The unchecked items are non-critical for this change.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
HEIC photos taken with recent iPhones could not be previewed: the viewer showed "No preview available" because the library used to convert them (
heic2any, unmaintained since 2023) does not support their format (ERR_LIBHEIF format not supported). The conversion now usesheic-to, which ships a recent libheif, and outputs JPEG.Related Issues
N/A
Related Pull Requests
N/A
Checklist
Testing Process
ERR_LIBHEIF format not supportedbefore the change.Additional Notes
Replaces the
heic2anydependency withheic-to.Summary by CodeRabbit