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

Image API not working #84

Open
yzalokar opened this issue Oct 29, 2024 · 4 comments
Open

Image API not working #84

yzalokar opened this issue Oct 29, 2024 · 4 comments

Comments

@yzalokar
Copy link

I am having trouble retrieving an image from the following api endpoint:
https://www.artic.edu/iiif/2/1adf2696-8489-499b-cad2-821d7fde4b33/full/843,/0/default.jpg

The API response is always 404 not found. I tested this with various different image id's.

On your website, where you use this api call, there is no image shown, which indicates that the API doesn't return an image.

Attached you have a screenshot of my response in postman and also a screenshot from your website, where the image is missing.

Can you please look into this? I am trying to develop a website based on your API.
25A31412-D30B-4252-B254-15798519BA0C
Screenshot 2024-10-29 at 15 35 04

@nikhiltri
Copy link
Member

What query is providing you with the image ID 1adf2696-8489-499b-cad2-821d7fde4b33?

@yzalokar
Copy link
Author

This specific image ID is displayed in your documentation:
https://api.artic.edu/docs/#images

But I also tried it with different image id's which I got through:
https://api.artic.edu/api/v1/artworks
or:
https://api.artic.edu/api/v1/artworks/48883?fields=id,title,image_id

48883 is the ID from the first artwork I get when calling:
https://api.artic.edu/api/v1/artworks

Screenshot 2024-10-29 at 19 24 45

@nikhiltri
Copy link
Member

Ah, the specific ID that's used in our documentation may not necessarily by available anymore. What you’ll want to do is take the image_id that the /artworks endpoint provides you and plug that into the URL you’re using.

So in the case of the artwork with the ID 48883, its image_id is ac167e1a-78f0-2621-5676-58f38a6c16f3. Plug that into the URL you’re constructing and you’ll end up with:

https://www.artic.edu/iiif/2/ac167e1a-78f0-2621-5676-58f38a6c16f3/full/843,/0/default.jpg

Which resolves to the image for artwork 43338.

@yzalokar
Copy link
Author

Now I got it. The problem was sitting behind the pc 😄. Tanks alot!

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

2 participants