Bug 28180 - Use a lightbox gallery to display the images on the detail pages in OPAC
Summary: Use a lightbox gallery to display the images on the detail pages in OPAC
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 28179
Blocks:
  Show dependency treegraph
 
Reported: 2021-04-20 14:10 UTC by Jonathan Druart
Modified: 2021-09-12 22:13 UTC (History)
1 user (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 28180: Add Chocolat to OPAC (43.89 KB, patch)
2021-04-20 15:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Add a lightbox gallery to display cover images - detail page, OPAC interface (29.00 KB, patch)
2021-04-20 15:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Syndetics (2.90 KB, patch)
2021-04-20 15:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Google Jackets (5.58 KB, patch)
2021-04-20 15:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust OpenLibrary (4.57 KB, patch)
2021-04-20 15:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Baker and Taylor (3.08 KB, patch)
2021-04-20 15:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Bug fix - cannot select cover-nav button when on top of the .contentblock (1.11 KB, patch)
2021-04-20 15:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Add Chocolat to OPAC (43.23 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Add a lightbox gallery to display cover images - detail page, OPAC interface (29.09 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Syndetics (2.96 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Google Jackets (5.65 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust OpenLibrary (4.64 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Baker and Taylor (3.15 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Bug fix - cannot select cover-nav button when on top of the .contentblock (1.17 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Add Chocolat to OPAC (44.05 KB, patch)
2021-05-04 13:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Add a lightbox gallery to display cover images - detail page, OPAC interface (29.17 KB, patch)
2021-05-04 13:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Syndetics (3.05 KB, patch)
2021-05-04 13:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Google Jackets (5.74 KB, patch)
2021-05-04 13:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust OpenLibrary (4.73 KB, patch)
2021-05-04 13:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Baker and Taylor (3.24 KB, patch)
2021-05-04 13:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Bug fix - cannot select cover-nav button when on top of the .contentblock (1.27 KB, patch)
2021-05-04 13:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: (follow-up) Remove console.log (1.12 KB, patch)
2021-05-10 07:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Restore NO_LOCAL_JACKET (989 bytes, patch)
2021-05-10 07:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: (follow-up) Updates to styling of lightbox controls (22.88 KB, patch)
2021-05-10 18:27 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28180: (follow-up) Updates to styling of lightbox controls (22.94 KB, patch)
2021-07-12 14:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: CSS changes (754.85 KB, patch)
2021-07-12 14:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: CSS changes (755.69 KB, patch)
2021-07-26 07:31 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix collision with existing verify_images (5.23 KB, patch)
2021-08-11 12:44 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix some non-translatable strings (2.29 KB, patch)
2021-08-11 12:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix collision with existing verify_images (4.56 KB, patch)
2021-08-11 13:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Correctly guess if images have been loaded (3.62 KB, patch)
2021-08-11 14:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix bug with AdLibris (2.04 KB, patch)
2021-09-12 22:09 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2021-04-20 14:10:15 UTC

    
Comment 1 Jonathan Druart 2021-04-20 15:07:54 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2021-04-20 15:07:59 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2021-04-20 15:08:03 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2021-04-20 15:08:07 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2021-04-20 15:08:14 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2021-04-20 15:08:19 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2021-04-20 15:08:24 UTC Comment hidden (obsolete)
Comment 8 PTFS Europe Sandboxes 2021-05-04 12:18:14 UTC Comment hidden (obsolete)
Comment 9 PTFS Europe Sandboxes 2021-05-04 12:18:19 UTC Comment hidden (obsolete)
Comment 10 PTFS Europe Sandboxes 2021-05-04 12:18:23 UTC Comment hidden (obsolete)
Comment 11 PTFS Europe Sandboxes 2021-05-04 12:18:27 UTC Comment hidden (obsolete)
Comment 12 PTFS Europe Sandboxes 2021-05-04 12:18:31 UTC Comment hidden (obsolete)
Comment 13 PTFS Europe Sandboxes 2021-05-04 12:18:34 UTC Comment hidden (obsolete)
Comment 14 PTFS Europe Sandboxes 2021-05-04 12:18:38 UTC Comment hidden (obsolete)
Comment 15 Jonathan Druart 2021-05-04 13:39:44 UTC
Created attachment 120464 [details] [review]
Bug 28180: Add Chocolat to OPAC

See Bug 28179: Add the Chocolat gallery lightbox JS library

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 16 Jonathan Druart 2021-05-04 13:39:49 UTC
Created attachment 120465 [details] [review]
Bug 28180: Add a lightbox gallery to display cover images - detail page, OPAC interface

This patch is the OPAC version of
  Bug 28179: Add a lightbox gallery to display cover images - detail page, staff interface

But there were several difficulties as the staff and OPAC code diverged
a lot.
First we are going to apply the different enhancements that have been
made staff-side:
- Display all the local cover image on the bibliographic detail pages
(before this patch only the first one was displayed)
- The slider functionality added by bug 25031

Test plan:
All the cover images are affected, all the different sources will be
tested.
All the steps will be done on the same bibliographic record.
1. Local cover images
 a. Turn on OPACLocalCoverImages and AllowMultipleCover
 b. Add several local cover images to a bibliographic record
 c. Add several local cover images to an item
 d. Click on an image and confirm that it is displayed in a gallery and
 you can navigate see all the images attached to the bibliographic
 record
 e. Same for items
2. Adlibris
 a. Turn on AdlibrisCoversEnabled
 b. Edit the biliographic record and add an ISBN that will return a
 cover image for this service (9780670026623 for instance)
 c. Display the cover images in the gallery
 d. Note the link to the adlibris.com website at the bottom
3. Amazon
 a. Turn on OPACAmazonCoverImages
 b. Display the cover images in the gallery
4. Coce
 a. Turn on OpacCoce, set CoceHost to "http://coce.tamil.fr:8080"
 and select some values for CoceProviders.
 b. Display the cover images in the gallery
5. Custom cover images
 a. Turn on OPACCustomCoverImages and set CustomCoverImagesURL to https://covers.openlibrary.org/b/isbn/{isbn}-M.jpg
 of anything else meaningful
 b. Display the cover images in the gallery

QA Note: Other sources have been removed by this patch but will be
re-added by follow-ups

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 17 Jonathan Druart 2021-05-04 13:39:53 UTC
Created attachment 120466 [details] [review]
Bug 28180: Reintroduce and adjust Syndetics

Test plan:
1. Enable SyndeticsEnabled and SyndeticsCoverImages
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 18 Jonathan Druart 2021-05-04 13:39:57 UTC
Created attachment 120467 [details] [review]
Bug 28180: Reintroduce and adjust Google Jackets

Test plan:
1. Turn on GoogleJackets
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 19 Jonathan Druart 2021-05-04 13:40:01 UTC
Created attachment 120468 [details] [review]
Bug 28180: Reintroduce and adjust OpenLibrary

1. Turn on OpenLibraryCovers
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 20 Jonathan Druart 2021-05-04 13:40:06 UTC
Created attachment 120469 [details] [review]
Bug 28180: Reintroduce and adjust Baker and Taylor

Test plan:
1. Turn on BakerTaylorEnabled and fill BakerTaylorUsername/BakerTaylorPassword (if you don't have, ask me)
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 21 Jonathan Druart 2021-05-04 13:40:10 UTC
Created attachment 120470 [details] [review]
Bug 28180: Bug fix - cannot select cover-nav button when on top of the .contentblock

Found a bug and ended up with this solution, suggestions welcomed!

example with OpenLibrary with isbn=9780670026623, the image is a bit
higher than others and then the cover-nav buttons are on top of
.contentblock and cannot be clicked

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 22 Jonathan Druart 2021-05-04 13:41:10 UTC
Signed-off-by patches attached on behalf of the sponsor.
The sandbox's signoff process picked the name of the creator of the sandbox instead of the one filled in on the signoff form.

Also, the status has not been adjusted.
Comment 23 Katrin Fischer 2021-05-09 11:34:29 UTC
I am seeing a failure in the QA script, can you please check:

 FAIL	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
   OK	  filters
   FAIL	  forbidden patterns
		forbidden pattern: console.log (line 1754)

Also and more importantly, with this patch covers on result list are broken:

Uncaught ReferenceError: NO_LOCAL_JACKET is not defined
    GetCoverFromBibnumber http://localhost:8080/opac-tmpl/bootstrap/js/localcovers_20.1200047.js:25
    jQuery 2
    GetCoverFromBibnumber http://localhost:8080/opac-tmpl/bootstrap/js/localcovers_20.1200047.js:21
    <anonymous> http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=perl&weight_search=1:3137
    jQuery 2
Comment 24 Jonathan Druart 2021-05-10 07:16:21 UTC
Created attachment 120753 [details] [review]
Bug 28180: (follow-up) Remove console.log
Comment 25 Jonathan Druart 2021-05-10 07:16:26 UTC
Created attachment 120754 [details] [review]
Bug 28180: Restore NO_LOCAL_JACKET

This is a patch to squash. No idea what it got removed previously
Comment 26 Jonathan Druart 2021-05-10 07:17:06 UTC
(In reply to Katrin Fischer from comment #23)

Both fixed!
Comment 27 Owen Leonard 2021-05-10 18:27:40 UTC
Created attachment 120805 [details] [review]
Bug 28180: (follow-up) Updates to styling of lightbox controls

This patch adds style changes like the ones made in Bug 28179. It also
addresses a bug with the way the verify_images() function was firing.
I've moved the function outside of document.ready() and added a call to
it on window load, consistent with how it works in the staff client.

I've removed a redundant call to verify_images() from the footer include
file, opac-bottom.inc.

The cosmetic changes replace the Chocolat image icons with new SVG
assets based on Bootstrap Icons (https://icons.getbootstrap.com/). The
color changes I think help the controls to be more visible.
Comment 28 Jonathan Druart 2021-07-12 14:22:43 UTC
Created attachment 122783 [details] [review]
Bug 28180: (follow-up) Updates to styling of lightbox controls

This patch adds style changes like the ones made in Bug 28179. It also
addresses a bug with the way the verify_images() function was firing.
I've moved the function outside of document.ready() and added a call to
it on window load, consistent with how it works in the staff client.

I've removed a redundant call to verify_images() from the footer include
file, opac-bottom.inc.

The cosmetic changes replace the Chocolat image icons with new SVG
assets based on Bootstrap Icons (https://icons.getbootstrap.com/). The
color changes I think help the controls to be more visible.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 29 Jonathan Druart 2021-07-12 14:22:49 UTC
Created attachment 122784 [details] [review]
Bug 28180: CSS changes
Comment 30 Jonathan Druart 2021-07-12 14:23:16 UTC
Your follow-up is working great, Owen. Thanks!
Comment 31 Katrin Fischer 2021-07-24 23:16:40 UTC
Can you please fix the conflicts?

Using index info to reconstruct a base tree...
M	koha-tmpl/opac-tmpl/bootstrap/css/opac-rtl.css
M	koha-tmpl/opac-tmpl/bootstrap/css/opac.css
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/bootstrap/css/opac.css
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/css/opac.css
Auto-merging koha-tmpl/opac-tmpl/bootstrap/css/opac-rtl.css
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/css/opac-rtl.css
error: Failed to merge in the changes.
Patch failed at 0001 Bug 28180: CSS changes
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Comment 32 Jonathan Druart 2021-07-26 07:31:00 UTC
(In reply to Katrin Fischer from comment #31)
> Can you please fix the conflicts?

> CONFLICT (content): Merge conflict in
> koha-tmpl/opac-tmpl/bootstrap/css/opac.css
> CONFLICT (content): Merge conflict in
> koha-tmpl/opac-tmpl/bootstrap/css/opac-rtl.css

Those are conflicts on the "Compiled CSS patch". The patch can be skipped and the patch regenerated with "yarn build && yarn build --view=opac"
Comment 33 Jonathan Druart 2021-07-26 07:31:27 UTC
Created attachment 123178 [details] [review]
Bug 28180: CSS changes
Comment 34 Katrin Fischer 2021-07-26 07:33:59 UTC
You are right, I was a little too fast. But why include them in the first place?
Comment 35 Jonathan Druart 2021-07-26 08:36:46 UTC
(In reply to Katrin Fischer from comment #34)
> You are right, I was a little too fast. But why include them in the first
> place?

To ease testing, especially for sandboxes.
Comment 36 Katrin Fischer 2021-07-26 09:28:37 UTC
(In reply to Jonathan Druart from comment #35)
> (In reply to Katrin Fischer from comment #34)
> > You are right, I was a little too fast. But why include them in the first
> > place?
> 
> To ease testing, especially for sandboxes.

You can now do the yarn build bit on the sandboxes, but of course not everybody might know that. I was more thinking about the conflicts causing problems there. There is always something that can go wrong I guess :) I shoudl have taken a better look here at the conflict anyway.
Comment 37 Katrin Fischer 2021-08-11 09:58:22 UTC
I believe there might be some problematic constructions for translation in the JavaScript, but need to investigate further:

lightbox_descriptions.push("Custom cover image");
lightbox_descriptions.push(_("Image from Google Books (<a href='%s'>see the original image</a>)").format($(img).data('link')));
Comment 38 Katrin Fischer 2021-08-11 09:59:00 UTC
One more:
img.alt = "Cover image";
Comment 39 Katrin Fischer 2021-08-11 10:18:54 UTC
There is something weird, if multiple cover providers are activated:

- Turn on OpenLibrary covers
- Turn on Amazon covers
- Search for "perl"
- Most books will show 2 covers in results and in the detail pages
- Example: CGI programming with Perl
- Turn on Google covers
- Result list shows 3
- Detail page: only Amazon
Comment 40 Katrin Fischer 2021-08-11 10:22:15 UTC
(In reply to Katrin Fischer from comment #37)
> I believe there might be some problematic constructions for translation in
> the JavaScript, but need to investigate further:
> 
> lightbox_descriptions.push("Custom cover image");
> lightbox_descriptions.push(_("Image from Google Books (<a href='%s'>see the
> original image</a>)").format($(img).data('link')));

They appear to work, at least seeing the strings in the po file.
Comment 41 Katrin Fischer 2021-08-11 10:45:14 UTC
Please check comment#39.

Also:

1) Link to source

At the bottom of the lightbox view it says:

[provider] cover image (see the original image)

I wonder if we could make it clearer here that we are linking to the provider's page as this is an external link where you will leave the library's website. And it won't only be the image you get to.

Maybe something along the lines of:
(see the original image on the [provider]'s website)

A native speaker might come up with a better wording :)
Comment 42 Jonathan Druart 2021-08-11 12:00:38 UTC Comment hidden (obsolete)
Comment 43 Jonathan Druart 2021-08-11 12:44:40 UTC Comment hidden (obsolete)
Comment 44 Jonathan Druart 2021-08-11 12:47:27 UTC
Created attachment 123792 [details] [review]
Bug 28180: Fix some non-translatable strings
Comment 45 Jonathan Druart 2021-08-11 13:07:33 UTC
Created attachment 123793 [details] [review]
Bug 28180: Fix collision with existing verify_images

At the OPAC we already had a verify_images JS function in amazonimages.js
It's preferable to use another function name.
This patch replace our verify_images with verify_cover_images and apply
the change to the staff code as well.
Comment 46 Jonathan Druart 2021-08-11 13:41:04 UTC
It's a problem in master as well (staff-side) and highlighted at the OPAC as we have more images coming from external providers.

The code to hide the non-existent images does not work as we expect.
In my case, a new laptop (faster) make the problem more obvious, the JS code is processed faster than before and we remove the div that contain images from amazon, google, etc. because the images are not loaded yet.

I think we should fix that on a separate bug report to fix the staff side at the same time. And obviously this new enhancement won't be pushed until it's fixed.

You can continue testing with the following (non optimal) patch:

diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
index 03f41fe8317..93b3c682f61 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
@@ -1620,7 +1620,7 @@
                             }
                         }
                     } else {
-                        div.remove();
+                        //div.remove();
                     }
                 });
Comment 47 Jonathan Druart 2021-08-11 14:37:41 UTC
Created attachment 123794 [details] [review]
Bug 28180: Correctly guess if images have been loaded

window.load won't assure us that the images loaded using JS code are
correctly loaded.

This patch adds a flag to the different providers when the images are
fully loaded.
Comment 48 Jonathan Druart 2021-08-11 14:38:04 UTC
I think this patch is the way to go.
Comment 49 Jonathan Druart 2021-09-08 10:03:39 UTC
Patches still apply, CSS changes need to be rebuilt with `yarn build --view=opac`
Comment 50 Katrin Fischer 2021-09-12 15:13:18 UTC
Patches still apply, but something has been broken since my last test run.

What I did so far:

- Made sure master was current
- restart_all, ran database updates
- Applied patches, no conflicts
- restart_all again
- yarn build --view opac


1) Turned on Adlibris covers.

Instead of the covers, only a link shows in the result list and detail pages.

2) Additionally activated Google covers.

The covers show, but not within the lightbox display.

3) Added Amazon covers

Now I see up to 2 covers, but next to each other, still no lightbox.


Did a patch get lost here? :(
Comment 51 Katrin Fischer 2021-09-12 21:30:14 UTC
Hm, I later realized that this was not meant to change results, but only the detail page. Previous comments apply to the results list.

On the detail page for me none of the 3 mentioned cover services covers show :(

Example: search for "perl" > Programming Perl
- 2 covers and the adlibris link on results
- no cover at all on detail page

Switch back to master, git stash, restart_all:
- Adlibris still broken on results
- covers show on results and detail page
Comment 52 Jonathan Druart 2021-09-12 22:09:25 UTC
Created attachment 124819 [details] [review]
Bug 28180: Fix bug with AdLibris

If Adlibris is first and there is no image
Comment 53 Jonathan Druart 2021-09-12 22:13:10 UTC
Hi Katrin, thanks!
You found a bug in a very specific combination. AdLibris is loaded first but there is no image there (is the service broken currently?).
The code copied from staff is broken. As we have much more cover services OPAC side the bugs are easier to catch.
I think this last patch is improving the situation but I cannot guarantee it will always work.
To be honest I've always tested with local cover images (as it's why this enhancement has been sponsored), and it was always working when a cover image is attached.