I'm trying to use an image that I put into localStorage as a base64 string in my chrome extension, using this as a guide: How to save an image to localStorage and display it on the next page? I store the image as a selectable file in my options.js, and it's persistent on the options page from session to session. But in my main Script.js, that same key is always null. This gives me the full string on my options page, but is null on every other page when I run the same code in my main script:
var dataImage = localStorage.getItem('imgData');
console.log(dataImage);
Is there something about local storage I'm not understanding?