visual studio code - how to refresh images in HTML Preview? -


i showing html preview containing image in vscode.
if html content supposed change, call update method of textdocumentcontentprovider. result in html preview see updated text, image still old one, though changed image file in meantime. when closing preview , reopening new image displayed.
how can force html preview reload images?

update code:

provider = new heapprovider(); //heapprovider extends textdocumentcontentprovider previewuri:string; method updatepreview(){   this.provider.update(this.previewuri)   vscode.commands.executecommand('vscode.previewhtml', this.previewuri,     vscode.viewcolumn.two).then((success) => { }, (reason) => {       vscode.window.showerrormessage(reason);   }); } 


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -