Skip to content

Can I add an image to SideBar Webview extension? #2418

Discussion options

You must be logged in to vote

CSP was a problem.
Here is the code in question.
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src ${webview.cspSource}; script-src 'nonce-${nonce}';">
It appears that this code did not allow the image to be displayed, so it could not be displayed.
After modifying the code to the following code, it was successfully displayed!
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src ${webview.cspSource}; script-src 'nonce-${nonce}'; img-src ${webview.cspSource}">

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Shoto9023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant