I need to check a document's data in Firestore to allow someone to view an image in Firebase Storage. Is this possible?
Edit: it is now possible to query Firestore from Storage security rules. You can read about it here and read the documentation here.
Original answer:
It is currently not possible to access Cloud Firestore documents directly from Cloud Storage rules. You have two options:
In either case, you will need some backend code that checks and sets the appropriate data.