e-e / tameyo

tameyō - "let's collect!"
0 stars 0 forks source link

save thumbnail in base64 for all images #18

Open e-e opened 6 years ago

e-e commented 6 years ago

save the thumbnail of the image as a base64 image. this way we can get around hotlinking images in the extension itself. i don't think it is [the extension's] responsibility what someone does with a link outside of the extension, so saving a small base64 image for the thumbnail will at least eliminate requests to the image from the extension itself.

Should probably save it so that it is large enough for the edit page display as well.

e-e commented 6 years ago

will probably need to add unlimitedStorage permission in the manifest.json file

e-e commented 6 years ago

cross origin issues with this...

e-e commented 6 years ago

try using content script in the source page to try to resize and convert to base64 to avoid cors issues with the canvas

https://stackoverflow.com/questions/32777310/messaging-between-content-script-and-background-page-in-a-chrome-extension-is-no

https://developer.chrome.com/apps/messaging