fix: Improve folder icon rendering (#2467)

This commit is contained in:
Dermot Duffy
2026-06-30 17:45:12 -07:00
committed by dermotduffy
parent d8ad347dfa
commit 056a038e81
4 changed files with 48 additions and 4 deletions
@@ -76,7 +76,15 @@ export class ThumbnailFeatureController {
if (thumbnail) {
this._thumbnail = thumbnail;
this._icon = null;
this._thumbnailClass = isBrandUrl(thumbnail) ? 'placeholder' : null;
// Treat as a placeholder (centered, contain-fit) when either the URL
// looks brand-like, or the item is a folder. The folder check is
// necessary because HA's media browser often returns folder thumbnails
// as local/proxy URLs that don't match isBrandUrl, even though they
// visually represent integration logos.
this._thumbnailClass =
isBrandUrl(thumbnail) || ViewItemClassifier.isFolder(item)
? 'placeholder'
: null;
} else {
this._thumbnail = null;
this._thumbnailClass = null;