Use local storage (or similar?) on Product or Home page

Case:

  • I have a client’s Product customisation (e.g. uploading a custom image) .
  • I want to show this image in a theme extension app both on the Home page and on the Product page, in different custom extensions.
  • The custom image should be uploaded only once, and then remain “saved” in some way across these pages. This is all before Checkout and even before adding to Cart.
  • Ideally, it’s also saved across sessions (but I can live without this for now)

Question:

What API can I use for this? I wanted to use useStorage for this, but that seems to only be available in the Checkout API. And trying to use it anywhere else gives:

Error: You can only call this hook when running as a checkout UI extension.

So what is the correct way of achieving this?