mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(web): load original image when zooming (#4040)
* feat(web): change max zoom from 4 to 10 * feat(web): load original image when zooming
This commit is contained in:
parent
52d0c5fc73
commit
bf3b38a7f2
2 changed files with 24 additions and 5 deletions
|
|
@ -173,3 +173,15 @@ export function getAssetRatio(asset: AssetResponseDto) {
|
|||
}
|
||||
return { width, height };
|
||||
}
|
||||
|
||||
// list of supported image extensions from https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types excluding svg
|
||||
const supportedImageExtensions = new Set(['apng', 'avif', 'gif', 'jpg', 'jpeg', 'jfif', 'pjpeg', 'pjp', 'png', 'webp']);
|
||||
|
||||
/**
|
||||
* Returns true if the asset is an image supported by web browsers, false otherwise
|
||||
*/
|
||||
export function isWebCompatibleImage(asset: AssetResponseDto): boolean {
|
||||
const imgExtension = getFilenameExtension(asset.originalPath);
|
||||
|
||||
return supportedImageExtensions.has(imgExtension);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue