Skip to content

fix(previewer): bypass IIPImage server for simple image preview - #1315

Open
slint wants to merge 1 commit into
zenodo:masterfrom
slint:skip-iipimage-restricted
Open

fix(previewer): bypass IIPImage server for simple image preview#1315
slint wants to merge 1 commit into
zenodo:masterfrom
slint:skip-iipimage-restricted

Conversation

@slint

@slint slint commented Mar 24, 2026

Copy link
Copy Markdown
Member
  • When we don't have tiles (e.g. for restricted records), we currently
    rely on nginx to interpret the 404/500 from IIPImage to fall back to
    the Flask application. This didn't work well in cases where IIPImage
    fails with a segfault or non-standard response.
  • We now explicitly add to the IIIF URL for the simple image preview
    (used for restricted records), a __skip_image_server=1 querystring
    parameter, so that nginx can interpret it directly and immediately
    skip/fallback to the Flask IIIF serving.
  • We also enable buffering on nginx, so we can properly handle upstream
    errors and fallback properly to Flask. This is fine since tile payloads
    from IIPImage are relatively samll.

@slint
slint force-pushed the skip-iipimage-restricted branch from acbac61 to 9b61044 Compare March 30, 2026 21:50
Comment thread site/zenodo_rdm/previewer/image_previewer.py Outdated
@slint
slint force-pushed the skip-iipimage-restricted branch from 9b61044 to 6625e0c Compare April 9, 2026 09:49
* When we don't have tiles (e.g. for restricted records), we currently
  rely on nginx to interpret the 404/500 from IIPImage to fall back to
  the Flask application. This didn't work well in cases where IIPImage
  fails with a segfault or non-standard response.
* We now explicitly add to the IIIF URL for the simple image preview
  (used for restricted records), a `__skip_image_server=1` querystring
  parameter, so that nginx can interpret it directly and immediately
  skip/fallback to the Flask IIIF serving.
* We also enable buffering on nginx, so we can properly handle upstream
  errors and fallback properly to Flask. This is fine since tile payloads
  from IIPImage are relatively samll.
@slint
slint force-pushed the skip-iipimage-restricted branch from 6625e0c to 4feee8a Compare April 9, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants