[Koha-bugs] [Bug 7600] New: Have book cover image script return single-pixel gif data

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 24 22:33:39 CET 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7600

             Bug #: 7600
           Summary: Have book cover image script return single-pixel gif
                    data
    Classification: Unclassified
 Change sponsored?: ---
           Product: Koha
           Version: master
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Tools
        AssignedTo: jcamins at cpbibliography.com
        ReportedBy: oleonard at myacpl.org
         QAContact: koha.sekjal at gmail.com


When you request a book cover image from Amazon which doesn't exist, the
response isn't a 404 but a single-pixel GIF. This page describes ways in which
developers can use this to have display of Amazon covers gracefully degrade:

http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html

We use the client-side technique in Koha. I wonder if we couldn't do the same
thing with the local covers? The hex dump of a single-pixel gif is tiny:

4749 4638 3961 0100 0100 8000 00ff ffff
0000 0021 f904 0100 0000 002c 0000 0000
0100 0100 0002 0244 0100 3b

Could that be converted to binary and returned in place of an error? For
instance, line 103 of opac-image.pl, "warn "No image exists for $imagenumber"
if $DEBUG;"

I'm guessing this would speed up loading the page since the browser spends a
lot of time looking for cover images which don't exist.

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the Koha-bugs mailing list