You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-24 04:46:50 +02: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:
committed by
GitHub
parent
52d0c5fc73
commit
bf3b38a7f2
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user