We report the application of two iodinated boron dipyrromethene (BODIPY) photocatalysts as theranostic compounds against pathogenic bacterial biofilms. These derivatives, which are activated through a polarity effect upon binding, have exquisite selectivity towards amyloids in the biofilm extracellular matrix (ECM). This property can be exploited in fluorescence microscopy to stain the ECM of uropathogenic bacterial biofilms, displaying a superior selectivity compared to Thioflavin T, the gold standard for amyloid detection. Moreover, we show that the ability of these compounds to photosensitize reactive oxygen species upon binding can be used to weaken the mechanical barrier of the ECM and restore the activity of conventional antimicrobial agents, whose effect is strongly limited in intact biofilms. The combination of activatable near-infrared fluorescence and photo-oxygenation properties of these compounds upon binding to amyloid structures provides a powerful theranostic tool for simultaneous detection and treatment of pathogenic biofilm infections.