A response surface methodology (RSM) based on a central composite design (CCD) approach was employed to optimize the concentration of glycerol and cellulose nanofiber (CNF) in Opuntia ficus-indica mucilage (3 % OFIM) functionalized with pomegranate peel extract (1 % PPE), aiming to enhance the preservation efficacy of banana fruit. The concentration ranges of glycerol (0.034–1.166 %) and CNF (0.0034–0.1166 %) generated from the experimental design were then used to formulate the composite edible films with the aim of enhancing their barrier and mechanical properties. The responses of the developed films were puncture force, water vapor transmission rate (WVTR), and inhibition against Botrytis sp. Numerical optimization established 0.252 % of glycerol and 0.02 % of CNF with estimated WVTR, Botrytis sp. inhibition, and puncture force of 9.73 g m−2/d, 27.27 mm, and 13.41 N, respectively. Subsequently, the optimized and validated concentrations of glycerol and CNF were used in the formulation of OFIM and the PPE-based film that was applied to banana fruit. The banana fruit were stored at 25 ± 2 °C for 10 d, and parameters including fruit weight loss, decay incidence, firmness, peel-WVTR, respiration rate, ethylene production and fatty acid compositions were assessed. The optimized formulation significantly (p < 0.001) reduced weight loss, decay incidence, firmness loss, peel-WVTR, respiration rate and ethylene production of the bananas throughout the 10 d postharvest storage. Scanning electron microscopy (SEM) images corresponded with the results observed regarding weight loss and peel-WVTR. The findings indicate that the optimal formulation developed in the present study enhanced the quality of bananas during storage.