[ndr] Improve thumbnail extraction