diff --git a/src/api/buildQuery.js b/src/api/buildQuery.js index e9d4dd87..670a6b63 100644 --- a/src/api/buildQuery.js +++ b/src/api/buildQuery.js @@ -44,6 +44,7 @@ const imageFields = ` cameraId make originalFileName + fileTypeExtension deploymentId projectId objects { diff --git a/src/features/images/utils.js b/src/features/images/utils.js index feba9602..4a36bb6d 100644 --- a/src/features/images/utils.js +++ b/src/features/images/utils.js @@ -10,7 +10,7 @@ const enrichImages = (res, camConfigs) => { img.deploymentName = deployment; // build urls for small & medium size images - const ext = img.originalFileName.split('.').pop(); + const ext = img.fileTypeExtension; img.url = IMAGES_URL + 'medium/' + img._id + '-medium.' + ext; img.thumbUrl = IMAGES_URL + 'small/' + img._id + '-small.' + ext;