This article investigates the application of swarm and evolutionary algorithms, namely the SOMA, DE, and GA, for optimizing the F-transform-based image compression. To do this, we introduce the cost function, evaluating the approximation of decompressed image to the original image, concerning the parameters that control the approximation quality of the F-transform. This function is then minimized by the selected algorithms to find optimal settings for image compression and decompression. We design experiments to compare the performance of the original F-transform method and the methods optimized by SOMA, DE, and GA on a dataset of 10 pictures. In all considered cases, the results obtained with the optimized method completely surpass those obtained by the original one. We also apply a statistical test (called Wilcoxon signed-rank test) for ranking the performance of selected algorithms in this issue. The results show that the SOMA and DE perform well in cases where the compressed image sizes are small. However, the GA algorithm shows outperformance in comparison with the others in more complicated cases where the compressed image size is bigger. The outperformance of the GA is in terms of decompression quality and computation time. Finally, we provide a visual comparison between the original F-transformbased method and the method optimized by the GA, tested on a 128 × 128 picture. The decompressed image by the latter is much sharper and more detailed than that obtained by the former.