mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 11:24:37 +02:00
fix(web): cannot view image when metadata sharing is turned off for public sharing (#10145)
* fix(web): cannot view image when metadata sharing is turned off for public sharing * Update web/src/lib/utils/asset-utils.ts Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
parent
3a3676bc82
commit
3eee6c4dcf
@ -263,6 +263,11 @@ const supportedImageExtensions = new Set(['apng', 'avif', 'gif', 'jpg', 'jpeg',
|
||||
* Returns true if the asset is an image supported by web browsers, false otherwise
|
||||
*/
|
||||
export function isWebCompatibleImage(asset: AssetResponseDto): boolean {
|
||||
// originalPath is undefined when public shared link has metadata option turned off
|
||||
if (!asset.originalPath) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const imgExtension = getFilenameExtension(asset.originalPath);
|
||||
|
||||
return supportedImageExtensions.has(imgExtension);
|
||||
|
Loading…
Reference in New Issue
Block a user