Skip to content

Drop image results that come back without a thumbnail URL - #2495

Draft
felladrin wants to merge 1 commit into
mainfrom
fix-thumbnailless-image-results
Draft

Drop image results that come back without a thumbnail URL#2495
felladrin wants to merge 1 commit into
mainfrom
fix-thumbnailless-image-results

Conversation

@felladrin

@felladrin felladrin commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Description

Currently, the image grid shows host-name text tiles instead of pictures, for a large share of the results. SearXNG often returns image and video results with no thumbnail_src (or no thumbnail, for the videos category), and until #2489 those results were dropped as a side effect: the server fetched every thumbnail itself, the fetch of an empty URL threw, and the result was filtered out. Now the browser loads each tile from /thumbnail, so nothing drops them anymore and they reach the carousel with an empty thumbnail, where the client renders the host name as a fallback.

Sampled on the dev container, before the fix: guitar tutorial 6 of 15, cat 6 of 20, cooking pasta 5 of 20, mountain landscape 4 of 18, javascript tutorial 3 of 16. After the fix, all five queries return zero results without a thumbnail. (On golden retriever puppies the grid went from a youtube.com placeholder in the second tile to 17 results that are all images.)

processGraphicalResult now returns null for those, so filterNullResults drops them the same way it drops a text result without a snippet. The now-unreachable try/catch around the tuple went away with it (it was there for the thumbnail fetch that moved to /thumbnail).

The client's host-name fallback tile stays as it is. It still covers the case it was written for: a thumbnail URL that is there but fails to load (a dead host, a 403, a non-raster type), plus cached history entries from before this change.

How to test

  1. docker compose up
  2. docker compose exec development-server npm run test (new case in server/webSearchService.test.ts: "drops image results that carry no thumbnail URL")
  3. Open http://localhost:7860/?q=guitar%20tutorial and check the image carousel. Every tile is a picture, with no gray boxes reading youtube.com or similar.
  4. docker compose exec development-server npm run lint

SearXNG often returns image and video results with no thumbnail_src or
thumbnail. Before the /thumbnail endpoint, those results were dropped as a
side effect of the server-side thumbnail fetch failing. Now the fetch happens
in the browser, so they survived to the grid and rendered as host-name text
tiles: 3 to 6 of every 10-20 results across sampled queries.

processGraphicalResult now returns null for them, so filterNullResults drops
them the way the other unusable results are dropped. The client's host-name
fallback stays for the case it was written for: a thumbnail URL that is there
but fails to load.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant