Skip to content

Commit

Permalink
Merge pull request #245 from SpeciesFileGroup/development
Browse files Browse the repository at this point in the history
Fix image gallery
  • Loading branch information
José Luis Pereira authored and GitHub committed Dec 4, 2024
2 parents 05ae936 + bfc09ae commit 2cace3d
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 2cace3d

Please sign in to comment.