Skip to content

Commit

Permalink
Fix image gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpereira committed Dec 4, 2024
1 parent b792eac commit bfc09ae
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/modules/otus/store/useImageStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const useImageStore = defineStore('imageStore', {
},

async loadImages(otuId) {
const UNSUPPORTED_FORMAT = ['image/tiff']
const params = {
extend: ['depictions', 'attribution', 'source', 'citations'],
otu_scope: ['all', 'coordinate_otus']
Expand All @@ -37,12 +36,10 @@ export const useImageStore = defineStore('imageStore', {
const image = { ...response.data.images[id] }
const { url, project_token } = __APP_ENV__

if (UNSUPPORTED_FORMAT.includes(image.content_type)) {
if (item.original_png) {
image.original = `${url}/${item.original_png?.substring(
8
)}?project_token=${project_token}`
}
if (image.original_png) {
image.original = `${url}/${image.original_png?.substring(
8
)}?project_token=${project_token}`
}

return image
Expand Down

0 comments on commit bfc09ae

Please sign in to comment.