One of the most popular methods used in the field of image segmentation is K-means (KM). However, some limitations are presented, the computational time and the initialization process of the cluster centers. This study provides a Histogram-Based KM (HBKM) clustering approach that incorporates a modified Firefly Algorithm (FA) to overcome the KM drawbacks. In the histogram-based method, it is implemented considering grey-level histograms rather than image pixels. As a result, time complexity significantly decreases due to the number of grey levels employed. Moreover, the original KM initialization procedure is prone to be trapped in local optima. Consequently, the proposed approach can avoid this issue based on the exploitation and exploration mechanisms of the Aquila Optimizer (AO) method. A rigorous experimental analysis for comparing the performance of the proposed method against several state-of-art Nature-Inspired Optimization Algorithms (NIOAs) clustering approaches is conducted. According to the experimental study, the suggested method presents competitive results in terms of precision, uniformity, and robustness of the segmented outcomes contrasted to state-of-art NIOA-based clustering approaches.