As we add more and more sources for cover images, and use them in more and more places, it becomes increasingly difficult to keep the code synchronized. I propose we move the logic of picking and displaying a cover image out of the templates and into a T:T Plugin. Usage would be like: [% biblionumber | KohaCoverImage %] I say biblionumber instead of normalised_isbn (which is common for most all external services) because it will also work for local cover images. This does add the overhead of having to look up the normalized ISBN again, even if we already had it on the page. Anyone more familiar with passing variables (particularly hashes) to T:T plugins, would be welcome to step up here. This would simplify out templates by several dozen lines of code, and provide a uniform logic for selection. New selection methods, as well as new sources, would be easy to add, since they'd only need to be coded in one place.
Look for "dynamic filters" on this page: http://template-toolkit.org/docs/modules/Template/Plugin/Filter.html
Using a filter is odd I think. Maybe something more like : [% Cover.getImage( biblionumber ) %]
*** This bug has been marked as a duplicate of bug 28180 ***