Overview

In the following article, I introduced the “Image Collection Management” tool designed for easily trying out IIIF features.

This time, I will introduce the technologies used behind this tool.

Introduction

The Image Collection Management tool is a web application for managing and publishing image collections in the IIIF (International Image Interoperability Framework) format, an international standard. This article explains the technical implementation of this tool, with a focus on the IIIF specification implementation and handling of geospatial information.

Tech Stack

  • Frontend: Next.js 14 (App Router), React, TypeScript
  • Backend: Next.js API Routes
  • Data Storage: AWS S3-compatible object storage (Cloudflare R2)
  • Authentication: NextAuth.js
  • Map Display: Leaflet, MapLibre GL JS
  • IIIF Viewers: Mirador 3, OpenSeadragon

IIIF Implementation Details

1. Supporting Both IIIF Presentation API v2/v3

This tool supports both version 2 and version 3 of the IIIF Presentation API. This ensures compatibility with various IIIF viewers.

Main Differences Between v2 and v3

{}{}"""""}"""""I@@@ls]I@itliIcitae""IcdyatIodybq@cIo"pbeFn"peutaFn:eemt:eleynt"lsve""npvve":""2x"::cea3xh::the"stt"s"t""s:es"tM{[t:tsT"st:pa.rpci:""rsn".u"s:ts:u":ie.ch:Ml[cch/fn]tt/ae{:[tt/e"ut/n"S.utes:rpei,e.rpxte:xfq.e:a"[/aeu]/m,"a/mse/pTriptniliril"cietaie,ei.lyf."fce.c,.o"oioim]fomo//m}camaa,apapnniniiv/i/fapfpesrerseesetssts"e"e,n,nttaattiioonn//23//ccoonntteexxtt..jjssoonn"",,

2. Multi-language Support

In v3, labels and descriptions can be managed by language:

{}"}"}l,sa""u""bjemjeeanmanl""a"""::r:::y[["[[{"":""JEJEan{anpgpgalalniniesesshsheeTdTideitestlsclecre"ri"]ip]pt,tiioonn""]],

3. IIIF Image API Support

Images served from external IIIF Image Servers can also be registered. By specifying the info.json URL, high-resolution images can be efficiently delivered:

c}o;nc}cccRso)oetnmb;nnngseosFsTsihttdtuthtsahylutnio:blimtednda-mbhrlf:JssanueoSeigamiIJ'OUzeibmnsPNreUlnafoO.lragonSsilUieJTt=mRls='ra=LUfo,iigrrnanne`(loAwgf$4mdaioU{0=difJRb0itysLap`n=(osx$ff{ne{oae.Uwb.stuiriajycrdldssnhl}teoc(:/hUn'f)r(/iulianil}npfnl/fiof/fo/JofuJisJulsioslloinol/nfUn/4U-r[00ril'/0ln@d,:f}ie/o)df0s''a/t,]udr;lei{tfn.agju)plgt=`.>;jp{g`;

Geospatial Information Implementation

1. navPlace Extension (IIIF v3)

The navPlace extension is used to indicate the representative location of the entire manifest. It is used for displaying collections on maps.

i}c}no;titf}n"]"}edye>As@,nr?patp}g};dtc""a""}f:etyr;e;dohhvtf]a:upolotcimnttPye""}"}csrepamyonatttlpatg,pet'e:ebepogneppaetye""r"rFsreterix::c"upotcolNie:'tlr:dlft/e:remyopaanaFi?yioe"/"e"epoebvgtAee::'ncs:ii:"s:terreP;urasPaatiiF:r"dtllrrt?{{ott[ii{e"y:ii"aeau:iei=ffa[F"ne:cCyr[nso..t{e:"aseo<e{lt:n{iiuaPt"{l{'a'ort{oe:{l;n;[i/euis"egnnaaCrn"{ec:ufppoet:ntmoiil"""isbr//l,,[:otempee1nrrarxc3['i,tett9";nisei.Tgnoeno7o]unnsn4k:mti"5ybtao,4oseotn,triSr]an3ti;na5anm/v.tga3p6i[n/l5o]ica8n[foc6"}lene]];ost/ntec}gxoitnt.tTujeodsxkeoty,n.o"jl,sSaottnai"ttiuodne]

2. Georeference Extension (Image Georeferencing)

By using the Georeference extension, specific points in an image can be mapped to real-world coordinates. This is used for georeferencing historical maps and similar applications.

i}nttmtb}eyoao;rptrdtt}f}feigyyr;e>a:ve:patoatp}g}m};catenyptyr;e;e;e't:{:sptuporotctltuAifeirepemyoaaarGnos'o:oe:esepodbglenntFrnsroteraes?oo:rem's:'tur:dtl?:Atiaap?Firyia?:na'ntto:Aeec:'n?:sntgguilrasePa:stoie;roy{rt:C{otstrtooennauoie{trianrC?ooyr{onsrint'eo:mr<ert:ingi;flid{'d'ng;oeCl{ae;s;[g[nraelr:n;]enc'?u;{nvt:[mcainbisonuenn'umrgU'tmb,'R;hbe;Iiernnr,u-mp}nbl;ueamrtb]ee;-rs]p;ligneeo'cg;oroarpdhiincatceosorodnintahteesimage

Implementation Example: Setting Control Points

c]cr13`o;oe00;n{}{}ns00Ss,Iso,,etrclrclmtu24teoaeoapr00tgsobsobocc00ieoreorerse,,noudludltvX11gPri:ri:D,33ocncnfar99ciea"ea"rte..onCtTCtUoas77ntoeooeemo46tsoskosn=u57rr:yr:oCr43o=dodS`c,,ls[s[SVe33[:1S:1tY55p3t3ai,..o[9a[9tsl66i1.t3.io58n07i07oan81t04o06nlg64s,5n,7"si,,4"3otTUb2,4,uoee00pdknt0303oeyow]5]5s,oe,.,.slSe66iaStn58btta81liati64ettim]]uioap,,dongienex,elclaoboclUeroaeldotniriondtaiuStndteaeast/teliasoonnndognigtetuohdgeeraiopmfhaigTceokcyooorSdtiantaitoens

3. Map Display Implementation

Collection Map (Using Leaflet)

c}o;nr)Dse;itt<suM/pCra<{MlonpTi)aalCiti}pyl(oletCeneme<oictLsmM/nttaa..apk<MteiiymlroeP/aamoneaoksyo<<Prisnerpcei=phioknMr(art{u3mpeeiauitiip>gurrnpcrtiot>{p>>eleoneis>t=n=mn=mtrht"{.ece(eh=&[im={rt>&id.{c=tt}tioi{p(eitlt[smtele3:.lmem5le.cs./o}tt6{c<hi}7sa/uo)6}thmn2.i3b=,to>no>inan1l.i{3ella9.a}.otm6piaa5etlp0nut3sd=]te{}r,ietzeieottmome.mamt=p.i{.lt1ool0rce}ga}>/t{izo}n/.{lxo}n/g{iyt}u.dpen]g}"

Integration with External Viewers

Generated IIIF manifests can be visualized in various IIIF viewers that support the navPlace and Georeference extensions. For example, by using theIIIF Map Viewer, it is possible to browse collections containing geographic information on a map.

Access Control Implementation (Planned)

The following access control features are planned for future implementation:

1. Manifest-level Control

  • Public/private settings per manifest
  • Access permission management by user groups
  • Fine-grained access control by owners

2. IIIF Auth API

Implementation of an authentication system compliant with the IIIF Authentication API is planned:

  • Token-based authentication
  • Issuance of time-limited access tokens
  • Integration with external authentication providers

Avoiding CORS Errors

CORS issues when registering images from external URLs are resolved with a server-side proxy:

e}xpccccct}}/oooooorarnnnnnyccrcrptsFssBssIooeaeitettattf{nnttt/atsssucuis{crbebdSttrhrmyheu6aahnnanusf4stasm{gcripfearhe{{elmoee6Upat-fanrn4rraddmu}gsclipdaaenee=o=satttc=d==taaato=aeBaaUUdianwu`v(rraowaaafdaa=lltnatwinfaiw,,aihatdetlaa/PteiraaiwwwrOtrr.:btaiioSrseef$lidduTeefstr{eitttt(qrepuoc,mhheruvtormops::.eeecnn(naohtqsrhsbtlram1sut(etuestre9e.su.ofno(pt2sjiraft'(a0tsdlrteTgsBd,:oe)rhryehuan;ae)ptafthN(y.erfaee)Bct}ipe.ix;ulo;m'rwgtfiSba).ihRfetag)fdteenrse.rt:qrtiedohu(n6dem,1e)g4if(0s;(,mabh8t'$euue0)b{nlfiabstfg}{sai;eh;esort6en):46s)'4.m)}me;`et;taaddaattaa.(h)e;ight};

Performance Optimization

1. Progressive Image Loading

c}c}o;o;nrncrFseSsoeettetnttulsucgrestrhencensittltinT`ieaszgh$ncrieu{gtgzsamiOee[pbitptsspnihtW.irafeiifzoiBmdieplaoatnsrUsplhd.iretS(lalUii=setrmzne=lae4=gl}l0>ty(/=0hift;ssiuh(.-iiluswzflmii1eB/bzd]da$net;s{ashieti:mUal>arrA=glgsre:eirtstzaasWeyruti<gsrdf{eiitrwtnnhoiWgg}mdi,,tdt/ththt0h:hea/erdn&Igesu&IefimItazbsFWuee.ilrwIdta,imt.rdahjrhtg:paehegyin`g<Au;h=PmtIb:8e0rn0u)=mb4e0r0})>)=>=>{{

2. Leveraging S3-Compatible Storage

c}o;nc}arIso)wemtnBKBC;atasueooiRugutcydnterepk:yttnlce:esudootkn3r`eam:eftCn$ldmyiTl{iTap,lyiapvonrepereSdo,enCor3c:tDcy=e.Ne=s's-sunsiebssae.mna.isweadsenyng(engnPvecdvcu./o.CtSjmUSl(O3pmR3ofb_eaL_uijBgnPdleU'dUfecC)Bl:tK;LaCEIrBoTCeum__fmNURfaAR2enMLrdE},(,/{$k{ekye:y}s`t;ring)=>{

Integration with Self-Hosting

Integration with Self Museum

Generated IIIF collections can be easily published onSelf Museum:

{}"}"}l,sa""u""bjemjeeanmanl""a"""::r:::y[["[[{"":""JEJEan{anpgpgalalniniesesshsheeTdTideitestlsclecre"ri"]ip]pt,tiioonn""]],

0

Summary

The Image Collection Management tool is implemented to balance usability and performance while conforming to the latest IIIF specifications. Key technical features:

  1. Standards compliance: Full support for IIIF Presentation API v2/v3, Image API, navPlace/Georeference extensions
  2. Flexible geospatial information: From simple location information to complex georeferencing
  3. Secure access control: JWT token-based authentication and fine-grained access control
  4. Performance: S3-compatible storage and CDN, automatic selection of appropriate image sizes
  5. Interoperability: Integration with various IIIF viewers and tools

Future plans include implementing the IIIF Change Discovery API and Content Search API, as well as adding more advanced geospatial analysis features.

References