Images on a websites

51 views
Skip to first unread message

Oleksii Semeniuk

unread,
Jan 15, 2023, 3:06:27 PM1/15/23
to Chromium Extensions
Working on the extension which has to insert background image on some pages, but the problem is that within manifest v3 and because of CSP you can't just insert the link so you have to download the pic first from the background script and then send it to the content script, but the problem is that if the pic let say around 10mb, you can't pass it thru the messages. The only way I knew was by creating blob link, but now you can't make it within a manifest v3. Any idea how to insert a pic to the page as a background?

Oleksii Semeniuk

unread,
Jan 15, 2023, 6:19:09 PM1/15/23
to Chromium Extensions, Oleksii Semeniuk
That was helpfull
but instead of this 
 const [port1, port2] = new MessageChannel();
has to be
const {port1, port2} = new MessageChannel();
https://groups.google.com/a/chromium.org/g/chromium-extensions/c/IPJSfjNSgh8/m/Dh35-tZPAgAJ
Reply all
Reply to author
Forward
0 new messages