Show LB placeholder in case of image loading errors

I was thinking of closing down my account recently and so I was browsing to… I don’t known, have a look.

I noticed cover arts on releases have loading errors on my PC (never mind this, it’s probably my company’s zScaler/proxy/firewall/anything).

In the case of loading errors, the browser will not display nicely:

User "jesus2099" - ListenBrainz Failed to load resource: net::ERR_EMPTY_RESPONSE

I also have those, but I guess it’s no issue, it’s normal when a release has no cover arts and in this case the placeholder is shown: Failed to load resource: the server responded with a status of 404 (NOT FOUND)

I think it should display the ListenBrainz placeholder in case of error event.

Another oddity is that in this case, the alt text was Cover Ar instead of the actual release title:

永遠の歌声 VOL.1 オリジナル曲のすべて
<img src="" alt="Cover art">

Although other loading error images do have a proper alt text:

<img src="" alt="Hour of the Nightingale">

And it doesn’t seem related to non-Latin characters as there are some showing in this other case:

<img src="" alt="ライブ収録盤">

Long release title, will also lead to worse display:


1 Like

Maybe I’m the only one getting broken cover arts on LB?
It could be because of my company proxies, etc.

Here is another example:


<img src="" alt="Ngọc Anh Online">

Although that jpg URL does work when I load it in my browser, the error message I got in the console, when this broken image showed up, is:

Failed to load resource: net::ERR_EMPTY_RESPONSE

If I press F5 to refresh page, it could then show up.
But I will get such broken images on almost all pages, when I browse my listens.

Strangely I don’t get any such broken images showing up anywhere on MB.

And I think what could be done (if it does not only happen to me) is to remove broken <img> element on error event, like done in my userscript, for example.

1 Like

I don’t get broken links on your pages, chrome mobile and chrome desktop.

But sounds like something could be fixed if the url loads for you, as you say!

I will take the opportunity to bump some image feedback I have!

edit: note that @monkey has already fixed this for releases with images, but not for the placeholder image

I should also make a ticket re. release IDs with no cover using the release group cover, when I have a minute :thinking:

1 Like