Reputation: 5712
I'm developing a google chrome extension. Is there a way to access thumbnail images of topsites I'm getting following error.
Not allowed to load local resource: chrome-search://thumb/https://www.google.lk/
(But if i open this url directly from browser I can see the image) Is there any permission that I must mention in manifest file or we can't access them?
Updated
I have tried with <all_urls>
permission as well. But still I can't access them
Upvotes: 3
Views: 1753
Reputation: 474
I have to be honest with you: you can't.
Been trying to get website thumbnails for more than a month (for a student project I am working on: a custom history browser) and I tried using html2canvas locally with a proxy, I tried using phantomjs and wkhtmltopdf on a server, and even though I set all permissions right (at least I hope so), it wouldn't let me load the image resources.
There is a pending issue (since 2009!) prompting google to allow us access to thumb and favicon, but it is still unsolved (well, they allowed access to favicon anyway).
What you can try to do is manage thumbnail creation yourself and use https://developer.chrome.com/extensions/tabs#method-captureVisibleTab
I hope you found your solution in the meantime and if you did, please post it here.
Upvotes: 2
Reputation: 21842
Please specify file permissions in your manifest like this
"permissions": [
"file:///*"
]
Documentation for Chrome Match Patterns
Upvotes: 0