SharePoint Generate Thumbnail to Documents
Thank you this blog code: img = location.origin + '/_api/v2.0/sharePoint:' + (ctx.CurrentItem.Path.replace(location.origin, '')) + ':/driveItem/thumbnails/0/large/content?preferNoRedirect=true';