Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omeka S dies when trying to add too-large IIIF image #1193

Closed
crism opened this issue Jan 22, 2018 · 4 comments
Closed

Omeka S dies when trying to add too-large IIIF image #1193

crism opened this issue Jan 22, 2018 · 4 comments

Comments

@crism
Copy link
Contributor

crism commented Jan 22, 2018

When importing an IIIF image, e.g. from here, Omeka S constructs a URL. If the image at that URL is larger than the allowed maximum, the IIIF server will return a 403 Forbidden response. Omeka S does not check for this, and when it tries to delete the temp file, it crashes.

@crism
Copy link
Contributor Author

crism commented Jan 22, 2018

PR #1194 fixes the crash. A more robust fix would detect the 403 response and fall back to a smaller version of the file; I’m not conversant enough with the IIIF API to implement that right now.

zerocrates added a commit that referenced this issue Jan 22, 2018
#1193: quick patch to prevent crashing on too-large image
@zerocrates zerocrates added this to the March 5 milestone Feb 19, 2018
@zerocrates zerocrates modified the milestones: March 5, March 19 Mar 5, 2018
@zerocrates zerocrates modified the milestones: March 19, April 2 Mar 19, 2018
@zerocrates zerocrates modified the milestones: April 2, April 16 Apr 2, 2018
@zerocrates zerocrates modified the milestones: April 16, April 30 Apr 16, 2018
@zerocrates zerocrates modified the milestones: April 30, May 14 Apr 30, 2018
@zerocrates zerocrates modified the milestones: May 14, May 28 May 14, 2018
@zerocrates
Copy link
Member

Yeah, we may need to switch to picking something out of sizes.

My understanding is also that full is going away in a future version of the IIIF spec so it might be in our best interests to switch to a different form for the thumbnailing URL now.

@zerocrates zerocrates modified the milestones: May 28, June 11 May 29, 2018
@zerocrates zerocrates modified the milestones: June 11, June 25 Jun 11, 2018
@zerocrates zerocrates modified the milestones: June 25, July 9 Jun 25, 2018
@bencomp
Copy link

bencomp commented Jul 3, 2018

I may be missing something here, but one of the features of the IIIF Image API is that you can request images in smaller sizes, for example to use as thumbnails. So instead of downloading a full-size image and resizing it on the side of Omeka S, I would recommend to download a thumbnail-sized image. Or is that what you were saying, @zerocrates?

@sharonmleon sharonmleon modified the milestones: July 9, July 23 Jul 9, 2018
@zerocrates zerocrates modified the milestones: July 23, August 6 Jul 23, 2018
@zerocrates zerocrates removed this from the August 6 milestone Aug 20, 2018
@zerocrates zerocrates added this to the September 4 2018 milestone Aug 20, 2018
@zerocrates zerocrates removed this from the September 4 2018 milestone Oct 1, 2018
@zerocrates
Copy link
Member

So, the problem for us here is just that IIIF image servers can support various subsets of the spec features. The full/max size is (supposedly) guaranteed to be supported even by the lowest levels of compliance with the spec, so that's what we use.

Obviously there's the idea that we could use the IIIF features themselves to get the size we want directly, but that resizing is not guaranteed to be available either.

Some version of this that depended on the sizes to be present, or looked at what features the server advertises support for to then try to use them, could be possible, but I'm not sure either provides a whole lot of practical benefit.

@zerocrates zerocrates closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2022
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

No branches or pull requests

4 participants