mirror-immich/web
midzelis 98c19547a5 fix(web): Create Person face preview not working for video assets
FaceEditor previously required an HTMLImageElement | HTMLVideoElement prop to
compute layout metrics and generate the face crop preview. This was unavailable
for video assets, so the preview thumbnail in the Create Person modal was always
missing, and face positions could be NaN during image load (naturalWidth is 0
before the image decodes).

Replace the DOM element prop with assetSize: Size and containerSize: Size, using
asset metadata dimensions that are always available from the API response.
computeContentMetrics() is extracted as a pure utility alongside
mapContentRectToNatural() for converting face rect coordinates back to original
image space.

For videos, VideoNativeViewer now captures the current frame to canvas when face
edit mode opens and sets assetViewerManager.imgRef, giving FaceEditor the same
image-based preview path as photo assets.

Change-Id: I0e9da549e3af40211abad4ab2c0270706a6a6964
2026-06-03 03:31:05 +00:00
..
bin chore: build sdk while server is starting (#22083) 2025-09-16 12:48:31 -04:00
src fix(web): Create Person face preview not working for video assets 2026-06-03 03:31:05 +00:00
static fix: allow bots to access /s/ urls (#27579) 2026-04-07 09:22:53 -05:00
tests chore(web): sort imports (#27922) 2026-04-21 14:51:38 -04:00
.browserslistrc chore: bump browserlists version and load tscompat browserlist from file (#19212) 2025-06-16 10:03:46 -05:00
.dockerignore feat(web)!: SPA (#5069) 2023-11-17 22:13:36 -06:00
.gitignore
.npmrc
.prettierignore chore(web): fix weblate conflicts (#10071) 2024-06-10 13:59:54 +01:00
.prettierrc chore(web): sort imports (#27922) 2026-04-21 14:51:38 -04:00
README.md fix(web): Updated web README.md (#12899) 2024-09-25 12:59:35 +00:00
eslint.config.js chore: tailwind linting (#28165) 2026-05-01 00:18:03 -04:00
mise.toml chore: faster web linting (#28303) 2026-05-08 16:55:14 -04:00
package.json chore(deps): update dependency prettier-plugin-svelte to v4 (#28762) 2026-06-02 13:38:57 +02:00
svelte.config.js chore: silence svelte state referenced locally warning (#28263) 2026-05-06 17:22:39 +02:00
tsconfig.json chore(deps): update dependency typescript to v6 (#27577) 2026-04-07 17:15:55 +02:00
vite.config.ts chore(web): sort imports (#27922) 2026-04-21 14:51:38 -04:00

README.md

Immich web project

This project uses the SvelteKit web framework. Please refer to the SvelteKit docs for information on getting started as a contributor to this project. In particular, it will help you navigate the project's code if you understand the basics of SvelteKit routing.

When developing locally, you will run a SvelteKit Node.js server. When this project is deployed to production, it is built as a SPA and deployed as part of the server project.