Support IIIF image with query parameters when generating (thumbnail) urls
Refs https://redmine.teklia.com/issues/7163
The model method Element.iiif_thumbnail_url
& Element.iiif_url
should support image paths with query parameters.
Example:
- server with url
https://rhus-209.man.poznan.pl
- image on that server with path `fcgi-bin/iipsrv.fcgi?IIIF=11/5/2020601/https___1914_1918_europeana_eu_contributions_21795/21795.258720.original.tif`
- element on that image with polygon
((0.0, 0.0), (0.0, 672.0), (876.0, 672.0), (876.0, 0.0), (0.0, 0.0))
Both methods use urljoin
which remove the query parameters. They should instead
- check if there is a
?
in the image path- no
?
: use urljoin - got a
?
: use urljoin on the part before it - then append the extra query parameters
- no