Fix #246 Metadata is not hidden when "Show metadata" is disabled

This commit is contained in:
Alan Grainger
2026-06-09 09:36:04 +12:00
parent e436fd36fb
commit 6ddd1e80ca
2 changed files with 11 additions and 5 deletions
+6 -2
View File
@@ -81,12 +81,16 @@ export async function gallery (res: Response, share: SharedLink, openItem?: numb
? asset.exifInfo.description
: ''
let width = asset.exifInfo?.exifImageWidth
let height = asset.exifInfo?.exifImageHeight
let width = asset.width
let height = asset.height
if (!width || !height) {
width = asset.exifInfo?.exifImageWidth
height = asset.exifInfo?.exifImageHeight
const orientation = asset.exifInfo?.orientation
if (orientation && ['5', '6', '7', '8'].includes(orientation) && width && height) {
[width, height] = [height, width]
}
}
return {
id: asset.id,
+2
View File
@@ -51,6 +51,8 @@ export interface Asset {
type: AssetType;
isTrashed: boolean;
exifInfo?: ExifInfo;
width?: number;
height?: number;
// Base64-encoded thumbhash for tasteful blur placeholders during lazy-load
thumbhash?: string;
}