Repository navigation
Open HEIC, HEIF, and WebP photos in the editor - #49
Merged
Merged
Conversation
Accept the formats in the file picker and decode HEIC/HEIF in the browser. Native decode is used when the browser can do it; otherwise heic-to loads only for that file. Co-authored-by: Joan Comadran <joancomadran@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
cursor Bot
pushed a commit
that referenced
this pull request
Nov 27, 2026
Update FAQ JSON-LD, llms.txt summary, home steps, about, iPad and Chromebook platform pages, and Fotoreto comparison tables so site text matches HEIC/HEIF and WebP input after PR #49, including honest HEIC decoder download notes where relevant. Co-authored-by: Joan Comadran <joancomadran@users.noreply.github.com>
joancomadran
added a commit
that referenced
this pull request
Nov 27, 2026
…mparativa Fotoreto (EN/ES) (#50) Update FAQ JSON-LD, llms.txt summary, home steps, about, iPad and Chromebook platform pages, and Fotoreto comparison tables so site text matches HEIC/HEIF and WebP input after PR #49, including honest HEIC decoder download notes where relevant. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Joan Comadran <joancomadran@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The editor can open WebP, HEIC, and HEIF photos entirely in the browser. Nothing is uploaded.
WebP (
.webp,image/webp) uses the same path as JPEG and PNG: the file picker accepts it, the browser decodes it, the session stores the original file, and export keeps the filename stem (frame.webp→frame-edited.jpgwith the default pattern).HEIC/HEIF (
.heic,.heif,image/heic,image/heif, plus the sequence MIME types):heic-to1.6.7, which wraps libheif 1.23.7 and libde265 (LGPL-3.0). It is the current browser build, it decodes in a worker, and it frees each libheif image and context after the file.heic2anyis older and its MIT claim over libheif is disputed; a hand-rolledlibheif-jsworker would duplicate whatheic-toalready does, and nesting another worker breaks Safari.createImageBitmapwithimageOrientation: 'from-image'). Safari keeps the system decoder’s resolution, orientation, and color. If that fails, the editor dynamically importsheic-to/next. The import is not in the editor chunk and is not precached by the service worker, so the first visit does not download the ~3.2 MB decoder.IMG_1234.heicwith the pattern{name}isIMG_1234.jpg; the default pattern{name}-editedisIMG_1234-edited.jpg.Decoding IMG_1234.heic… (1/2)while each file runs. A corrupt file toastsCould not decode broken.heic. The HEIC file may be corrupted.and does not drop the photos that opened.heic-toreleases the libheif context per file; its worker stays up so the next HEIC in the batch does not compile WASM again.Editor copy (EN and ES) now lists HEIC and WebP on the empty-state chips, the Open button, the filmstrip, and the unsupported-type message. Page titles, meta descriptions, H1s, and Amazon affiliate links are unchanged. Privacy copy stays “Nothing uploaded” / “Sin subir archivos”.
Verification
npm test— 52 passed, including acceptance, native-then-WASM decode, corrupt HEIC errors, and export stemsnpm run lintnpm run build(astro check+ production build). Decoder chunk:dist/_astro/heic-to.*.js(~3.2 MB), absent fromdist/sw.jsnpx playwright test— 34 passed. WebP opens without requesting the decoder. A HEIC + HEIF batch opens, and a corrupt HEIC shows the error toastFormat hints
HEIC and HEIF opened
WebP opened
To show artifacts inline, enable in settings.