fix: use cached blob URL in _createChip to prevent memory leak (#1266)

_createChip called URL.createObjectURL directly, bypassing the
_getPreviewUrl/_revokePreviewUrl cache. Each re-render of the
attachment strip leaked blob URLs that were never revoked.
This commit is contained in:
Paulo Victor Cordeiro
2026-06-02 17:55:59 +01:00
committed by GitHub
parent a8395b4e4c
commit 9c68ceafeb
+1 -1
View File
@@ -112,7 +112,7 @@ function _createChip(f, idx) {
chip.classList.add('thumb-image'); // lets CSS overlay the remove-X on the corner (mobile)
const img = document.createElement('img');
img.className = 'thumb-img';
img.src = URL.createObjectURL(f);
img.src = _getPreviewUrl(f);
img.alt = f.name || 'image';
chip.appendChild(img);
} else {