The lenses focus only on the objects at a specific distance when an image is captured, the objects at other distances look blurred. This is referred to as the limited depth of field problem, and several attempts exist to solve this problem. Multi-focus image fusion is one of the most used methods when solving this problem. A clear image of the whole scene is obtained by fusing at least two different images obtained with different focuses. Block-based methods are one of the most used methods for multi-focus fusion at the pixel-level. The size of the block to be used is an important factor for determining the performance of the fusion. Thus, the block size must be optimized. In this study, the comparison between the swarm-based and physics-based algorithms is made to determine the optimal block size. The comparison has been made among the following optimization methods which are, namely, Archimedes Optimization Algorithm (AOA), Atomic Orbital Search (AOS) and Equilibrium Optimizer (EO) from the physics-based algorithms and Particle Swarm Optimization (PSO), Artificial Bee Colony (ABC) and Jellyfish Search Algorithm (JSA) from swarm-based algorithms. The swarm-based ABC and JSA algorithms have shown a better performance when compared to physics-based methods. Moreover, meta-heuristic algorithms, in general, are more adaptive compared to the traditional fusion methods.