@@ -, +, @@ image - Apply the patch and view the bibliographic details page under a variety of conditions: - A title which has a matching Amazon image: - The image should load as expected. - A title which doesn't have a matching Amazon image - The image should not be found in the source at all after the page has loaded. - Test with local cover images enabled --- koha-tmpl/intranet-tmpl/js/coce.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/koha-tmpl/intranet-tmpl/js/coce.js +++ a/koha-tmpl/intranet-tmpl/js/coce.js @@ -33,7 +33,13 @@ KOHA.coce = { var img = document.createElement("img"); img.src = url; img.classList.add("thumbnail"); - img.title = url; //FIXME: to delete + img.alt = "Cover image"; + img.onload = function(){ + // image dimensions can't be known until image has loaded + if( img.height == 1 && img.width == 1 ){ + $(this).remove(); + } + } $(this).html(img); }); } --