Actual behaviour
When a thumbnail's file is no longer on the thumbnail storage but the thumbnail status cache still reports it as present — a stale cache entry, a file removed from the bucket, a restore that skipped the thumbnail storage — ImageThumbnailTrait::getStream() lets League\Flysystem\UnableToReadFile escape, and the request ends in a 500.
The stale status-cache entry is also left in place, so every subsequent request for that thumbnail produces the same 500 rather than regenerating it.
A related case: when generation itself fails, the caller cannot distinguish "could not generate" from "does not exist", so a failed generation cannot be answered with the placeholder that exists for exactly that purpose.
Expected behaviour
- A thumbnail whose file is genuinely missing → 404, and the stale status-cache entry invalidated so the next request regenerates it.
- A read that fails while the file is still there (permission, I/O, backend outage) → surfaced as the storage error it is, not silently regenerated, and the status cache left intact.
- A failed generation → the placeholder, distinguishable from a missing thumbnail.
Steps to reproduce
- Generate a thumbnail so its file and status-cache entry exist.
- Delete just the file from the thumbnail storage, leaving the status cache untouched.
- Request the thumbnail over the public thumbnail route → 500, repeatedly.
Additional information
No response
Actual behaviour
When a thumbnail's file is no longer on the thumbnail storage but the thumbnail status cache still reports it as present — a stale cache entry, a file removed from the bucket, a restore that skipped the thumbnail storage —
ImageThumbnailTrait::getStream()letsLeague\Flysystem\UnableToReadFileescape, and the request ends in a 500.The stale status-cache entry is also left in place, so every subsequent request for that thumbnail produces the same 500 rather than regenerating it.
A related case: when generation itself fails, the caller cannot distinguish "could not generate" from "does not exist", so a failed generation cannot be answered with the placeholder that exists for exactly that purpose.
Expected behaviour
Steps to reproduce
Additional information
No response