Skip to content

Commit

Permalink
Fix image export links
Browse files Browse the repository at this point in the history
  • Loading branch information
t11r committed May 1, 2024
1 parent ae0b8b0 commit 8499904
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/ViewExport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,14 @@ export default {
const resource = this.$store.manifest.items[page - 1].items?.[0].items?.[0].body;
if (resource?.service) {
const service = resource.service instanceof Array ? resource.service[0] : resource.service;
const quality = ['ImageService2', 'ImageService3'].includes(service.type)
const quality = ['ImageService2', 'ImageService3'].includes(service.type || service['@type'])
? 'default'
: 'native';
const size = service.type === 'ImageService3'
? 'max'
: 'full';
const id = service.id || service['@id'];
imageUrls[page] = `${id}${id.at(-1) === '/' ? '' : '/'}full/full/0/${quality}.jpg`;
imageUrls[page] = `${id}${id.at(-1) === '/' ? '' : '/'}full/${size}/0/${quality}.jpg`;
} else {
imageUrls[page] = resource.id;
}
Expand Down

0 comments on commit 8499904

Please sign in to comment.