[Bug 7600] New: Have book cover image script return single-pixel gif data
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@cpbibliography.com ReportedBy: oleonard@myacpl.org QAContact: koha.sekjal@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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7600 --- Comment #1 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 8068 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8068&action=edit Bug 7600: Return a single-pixel GIF when no local cover image exists -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7600 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7600 Kristina Hoeppner <kristina@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8068|0 |1 is obsolete| | --- Comment #2 from Kristina Hoeppner <kristina@catalyst.net.nz> --- Created attachment 8254 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8254&action=edit signed-off patch The test of the proposed patch was successful in that the 404 error message is not shown anymore (in Firefox 10 it could only be seen in the "Net" tab in Firebug after a reload of the page). The patch adds a tiny gif image and the placeholder "No cover image available" is not displayed. I saw that as a good sign to avoid too much information that doesn't really help the user. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7600 Kristina Hoeppner <kristina@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |kristina@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7600 Ian Walls <koha.sekjal@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #3 from Ian Walls <koha.sekjal@gmail.com> --- Falling back to a 1 pixel gif seems pretty safe, and it's well implemented here. This also opens the door for other default 'noimage' images down the road, should it ever come up. Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7600 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com Version|master |rel_3_8 --- Comment #4 from Paul Poulain <paul.poulain@biblibre.com> --- * local cover is a 3.8 ENH, so setting version accordingly * C4/Image.pm has 2 perlcritic failure before the patch, one after, good job ;-) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7600 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org