Additional asset directory

#1

Is there a way, and if so, how would I go about adding an additional directory after the extension is installed where image assets would be placed?

To add context. We’d like to allow users to save images locally to their machine that the extension would use. These images are optional for the user to download, and the reason is to remove unnecessary web requests to our server very time a page is loaded that has the image.

I know previously (I’m not sure about now?) that GreaseMonkey would create a directory in the profile and save script files to that directory.

Is this still possible, or do we need to store the image file data in Storage or IndexedDB as base64 and serve that instead?

0 Likes

(Martin Giger) #2

The “additional directory” is most likely indexedDB: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Working_with_files

0 Likes