Schematic showing ropivacaine-loaded hydrogels relieve PTT-induced severe pain and simultaneously potentiate photothermal therapy. (A) Preparation of PFIRM hydrogel. (B) PTT raises tumor temperature and promotes the release of inflammatory cytokines that activate TRPV1, resulting in severe pain. Ropivacaine inhibits the activation of TRPV1 and blocks TRPV1-mediated nerve conduction from the peripheral to the central nervous system, resulting in relief of PTT-induced pain. (C) Mechanism of PFIRM-potentiated photothermal therapy. Firstly, ICG-mediated PTT kills tumor cells and promotes their release of tumor-specific antigens; secondly, antigens combined with imiquimod promotes DCs maturation, priming tumor-specific CD8+ T cells; finally, ropivacaine upregulates MHC-I in tumor cells, facilitating tumor recognition by primed CD8+ T cells.