Bug 36835 - Add a way to get a local cover image from biblionumber
Summary: Add a way to get a local cover image from biblionumber
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 36223 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-05-12 17:07 UTC by Mathieu Saby
Modified: 2024-05-14 09:02 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Saby 2024-05-12 17:07:24 UTC
I don't think there is currently an API route for getting a local cover image (stored by Koha) from the biblionumber of the record

It could be useful
Comment 1 Magnus Enger 2024-05-14 07:20:44 UTC
You can do requests like these: 

https://<opac>/cgi-bin/koha/opac-image.pl?thumbnail=1&biblionumber=68225
https://<opac>/cgi-bin/koha/opac-image.pl?biblionumber=68225

...and get the image back. What would the API return other than the image itself?
Comment 2 Arthur Suzuki 2024-05-14 07:27:49 UTC
*** Bug 36223 has been marked as a duplicate of this bug. ***
Comment 3 Arthur Suzuki 2024-05-14 07:33:45 UTC
In my opinion there is still something missing though.
There is no way to know if a record actually have a local cover image or not.

If you use a generated link with the biblionumber in the hope that all your catalog will have cover image then many records will be missing a cover (unless you provide a local cover image to all your records).

It would be great to export the local cover image to a marc field only if it exists.
we could then check the presence of this field (unimarc 856u for example) to generate a cover image link, or not.
Comment 4 Mathieu Saby 2024-05-14 08:58:51 UTC
oh I did not know the URL https://<opac>/cgi-bin/koha/opac-image.pl?biblionumber=68225
It suits my needs
Comment 5 Mathieu Saby 2024-05-14 09:02:35 UTC
but I agree with Arthur's comment, we should have a way to check if a record has a (or several) local cover

But you can not use 856u in unimarc for that, this field must be reserved for the link to the online ressource itself (see https://www.transition-bibliographique.fr/wp-content/uploads/2018/07/B856-6-2010.pdf , in french). I think marc21 is less strict.