Graphitic carbon nitride (g-C3N4) with photo-attached platinum (Pt@g-C3N4) is known to generate hydrogen under illumination in aqueous environments in the presence of carbohydrate hole quenchers. Here, Pt@g-C3N4 is embedded into a polymer of intrinsic microporosity (PIM-1) host material with a molecularly rigid structure to maintain active unblocked catalyst surfaces and to control transport to/from the photocatalyst. A Clark-type oxygen/hydrogen sensor is employed with Pt@g-C3N4 embedded into PIM-1 applied as a film to be the gas-permeable sensor membrane. Oxygen reduction and hydrogen production are observed in situ as a function of light exposure and quencher concentration. Significant size-selectivity favouring smaller more flexible saccharides or carbohydrate/ hydrocarbon quenchers is observed and attributed to rate limiting PIM-1 micropore transport. Effective hydrogen production through a Teflon membrane is demonstrated. The underlying hydrogen production/ photocurrent enhancing effects of the microporous PIM-1 film on the photochemical process are revealed.