Foodborne pathogens seriously endanger people's health and cause significant economic losses. Therefore, it is of great significance to design potent packaging materials with the function of alleviating food spoiling and extending shelf life. Here, three BODIPY derivatives (named as N-BDPI, B-BDPI and P-BDPI) were synthesized by substituting the 8-position of BODIPY with naphthalene, biphenyl and pyridine groups, respectively, and their photophysical properties as well as antibacterial capacities were characterized. The results demonstrated that N-BDPI had the best singlet oxygen generation ability and could completely kill S. aureus under light irradiation with the minimum inhibitory concentration of only 50nmol/L. In addition, 1.0% BDPI@PVA/AL composite film was fabricated by doping N-BDPI into polyvinyl alcohol (PVA) and alkaline lignin (AL) exhibited high antibacterial activity on Gram-positive bacteria. The coating of strawberries with 1.0% BDPI@PVA/AL film not only effectively inhibited the mildew of strawberries, but also extended their shelf life.