A small single-molecule theranostic agent based on naphthalimide was developed, which possessed both bright fluorescence imaging and effective photodynamic therapeutic treatment.