Gallery Thumbnail Problem

There seems to be an issue with thumbnails in the gallery, artwork, etc. They randomly get replaced by a clipped BA logo, even if the thumbnail loaded successfully. Behold:

It will keep happening as I scroll to load more posts. Reloading the page will just result in a different random selection. Clearing the cache also has no effect.

Also it would seem like some of the thumbnails are loading bigger images instead of the 160x160 px versions.

I canā€™t reproduce that. Which browser do you use?

All of them, all machines, all OSes.

Thatā€™s not helpful, please be more specific. This is the first time this is reported and I cannot analyse it without clear steps to reproduce.

That is as specific as I can get, when I say all of them, I mean all of them. I get the same effect no matter the machine, browser, or OS.

Linux, MacOS, and Windows.
Vivaldi, Chrome, Firefox, Pale Moon, Safari, even the Steam Overlay Browser.

I can always try to set the dom element to break on modification to see what scripts are doing, problem is I have to be fast about it.

Confirmed here also on FF. This link is problematic https://blenderartists.org/c/artwork/forum-gallery others under c/artwork/ seemed ok for me.

Tried again, this time BA logos were further down the results. Caching affected?

Logged out, cleared cache manually. Traditional & Sketchbooks sub forums were also affected when checked.

A room In Focused Crits is always a BA logo, probably the image link (wordpress).

Quickly scrolling may influence it too. Get to bottom of loaded list, more topics load, scroll further, some newly shown thumbs also display the logo now. Seems image size and external links could affect it also. Time out / load issue?

Animated comic Missing last post (separate issue)

Breaking on element attribute change and making my way up the call stack to escape the bloated 60000 line _ember_jquery-whatever.js with my life, places me here:

Where it is assigning defaultThumbnail.

In my case the thumbnail either loaded already or was still in the process of loading. It should not be replacing a valid image or one that is still loading.

1 Like

Try this to reproduce using the dev tools in chrome-based browser:

Sorry for the complete offtopic, but can you reupload the Pilesā€™Nā€™Tiles addon? Cause the old thread died with the migrationā€¦

Hmmā€¦ I had not checked yet. Old URL was here:
https://blenderartists.org/forum/showthread.php?377518-Addon-Piles-N-Tiles-Seamless-Tools-for-Blender

So I guess yeahā€¦ ā€œMy thread is gone, and it canā€™t get back up.ā€ :troll:

Move these posts into wherever the thread of ā€˜missing threadsā€™ isā€¦

1 Like

Anyway back on topicā€¦ it would seem the artwork thumbnails are not allowed to function on slow connections. They load fine, but seem to get replaced by a script with either a timeout or bad ā€œisLoadedā€ flag.

There was a saying by a wise man (droid) that went: ā€œLet the wookiee win.ā€

Let the browser load.

Thanks, that was an excellent report! Iā€™ve tracked it down to expected behaviour: the featured images plugin has a setting that defines when it will ā€˜give upā€™ loading these thumbnails. Itā€™s currently set to 5 seconds, after which the default thumbnail will be shown instead. Iā€™ve set this to 10 seconds now - I think thatā€™s a reasonable upper limit?

15 IMO. But sure, the line needs to be drawn somewhere. Still considering this is an international forum peoples connections are going to vary a lot.

One thing Iā€™ve noticed is that if any thumb is missing, it seems to take the whole ten seconds before it renders any thumbs at all. IOW, unless Iā€™m hallucinating, the code seems to be locked to requiring the complete quota of thumbs before it starts rendering. If one is missing it seems to sit there waiting out the time limit, then render the lot at once.

Edit: Scratch this. I just tried more pages and it works like it should. I might have had a random patch of slow connection just before.

Weā€™ll see if this becomes a problem. Keeping webserver connections open for too long can negatively impact performance for the entire site.

Yes, and in some respects letting things fail so to speak might be better from the perspective of people with reallllllllly bad connections.

1 Like

Sorry, but this makes absolutely no sense at allā€¦ The rest of the resources on the site have no such limitation. The thumbnail elements are 160x160px which the images should be, but many of the images are their full size instead. Same as ā€œfeature row.ā€

If you want to save on connections and bandwidth, get rid of any ridiculous loading detectors with timeouts and make sure all thumbnails are actually 160x160px. Just generate them server side, once.

Not everybody has perfect internet service, especially in the US. Most of the local DSL connections where I live, which is the example throttling profile I posted, can go even slower. That is what I had until last year, and it would often dip into the lower 30-100 Kb/s range. I was lucky enough to get 8Mb/s service from a WISP last year, but many here are still stuck with the crappy DSL. The WISP aint perfect either. Bad weather can make ping skyrocket because of re-sends.

And here is the thing with people who have crappy connections; I would know I have had them most of my life. If something fails to load, I get pissed and hit reload, over and over, until it finally does load. And I know that wastes far more bandwidth than would have been required in the first place. Not all resources a browser tries loading are resume-able (server side setting, dynamic content, etc.), and much of the time, a half-loaded image is not kept in the cache for long. Itā€™s not just browsers either, other things with connection timeouts I have fought in the past. I used maybe 4-8 times as much bandwidth because of restarts from closed connections.


As a side note: Maybe let the uploaders of said artwork specify the center of their image too, since I noticed it just crops off sometimes relevant portions of the image to make it fit a square. Better yet: just resize the artwork to fit inside the square rather than fill it, thus maintaining aspect ratio.

1 Like

Even with the increase in timeout, itā€™s still happening to me; less often on the initial page load, but still quite a bit with the dynamic loading as you scroll down, especially when one of them is full size. A very large one can slow the rest down resulting in most of that batch being replaced.

Anyway here is a quick solution I am using for now that should work with Tampermonkey or similar:

// ==UserScript==
// @name         BA2 Thumbnail Fix
// @namespace    https://blenderartists.org/t/gallery-thumbnail-problem/1110911
// @version      0.1
// @description  Allows thumbnail images on artwork posts to remain visible.
// @author       SynaGl0w
// @match        https://blenderartists.org/*
// @grant        none
// ==/UserScript==

var u = "b277e0d1fae7ba105b6d03e603c55efe2f52b59d.png";
var observer = new MutationObserver(function(mutations)
{
	mutations.forEach(function(mutation)
	{
		if(mutation.type == "attributes" && mutation.attributeName == "src")
		{
			var t = mutation.target;
			if(t.src.endsWith(u) && !mutation.oldValue.endsWith(u))
			{
				t.src = mutation.oldValue;
			}
		}
	});
});
observer.observe(document,
{
	subtree: true, childList: true,
	attributes: true, attributeOldValue: true
});

This completely fixed the problem for me (for now) and itā€™s actually really fast because images actually finished loading and wound up in my cache, so they donā€™t have to be downloaded again. Works for me in Vivaldi, Chrome and Firefox. Have not tested anything else. Obviously you will have to update it should the file name change or the method of replacement altered.

2 Likes