I have a directory with some *.jpg images.
Selecting 2 images and opening Tools->Compare an additional tab opens and shows the selected images and also an area that contains the thumbnails of all images available in selected directory.
This is ok, but
(1) in case of the directory does only contain some images, the thumbnails do only contain an icon.
(2) In case of the directory has >5 images the thumbnails show all images itself.

For case (1) the thumbnails can/must be rebuilt properly selecting: "no thumbnails" and then "thumbnails bottom/right".

attached please find the requested screenshot.
At bottom of screenshot you see 5 thumbnails, that show only the icon of the assigned application.
In case of the directory contains > 5 images, each thumb will show the image itself.

I followed your suggestions; started with the xnview.ini file (as sent to you) and then I checked Tools->Catalog->Use thumbnail chaching.
Now I marked 2 *.jpg images and opened Tools->Compare. The result was: all thumbnails were displayed as expected.
I restarted XnViewMp and with Tools->Compare all thumbnails were displayed again.

Now I optimized my database and "Delete Thumbnails" was checked.
Now I repeated the "compare test" and no thumbnails were displayed ( as long as only <= 5 jpg images were stored in directory).