Bug 18978 - Amazon returns 1x1 pixel image on shelf browse, preventing the "no cover image" image from showing
Summary: Amazon returns 1x1 pixel image on shelf browse, preventing the "no cover imag...
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 16.11
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-24 19:05 UTC by Michael Cabus
Modified: 2020-01-06 20:15 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Crowdfunding committed: 0
Crowdfunding contact:
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 Michael Cabus 2017-07-24 19:05:27 UTC
When using Amazon as a source for cover images, images within the shelf browse feature can be 1x1 pixel, thus preventing the no image available image from showing.

An example of the image returned is:

https://images-na.ssl-images-amazon.com/images/P/0844254525.01._AA75_PU_PU-5_.jpg

Some would prefer the "no cover image available" to be shown rather than this 1x1 pixel image.
Comment 1 Owen Leonard 2017-08-01 16:42:00 UTC
Amazon always returns a 1x1 pixel if they don't have a cover image. That's why we have some JavaScript which is supposed to check for them:

/koha-tmpl/opac-tmpl/bootstrap/js/amazonimages.js

This technique originated here:

http://archive.oreilly.com/pub/a/javascript/2003/10/21/amazonhacks.html

It sounds like the problem is that either the script isn't running correctly in the shelf browser or the shelf browser is using markup which prevents the images from being recognized by the script.
Comment 2 Owen Leonard 2019-03-14 12:40:10 UTC
This bug doesn't appear to be valid in master.