Image steganography is a secure communication technique that conceals confidential information within digital images, commonly used in military, digital, and intelligence forensics applications. It preserves data integrity and confidentiality by avoiding attention and suspicion. The goal of this technique is to select random positions within the image to hide data and enhance spatial image steganography. This paper presents a hybrid model based on the salp swarm algorithm (SSA) and particle swarm optimization (PSO). The model is used to locate the optimal position of a text message within a cover image and embed it, ensuring that the stego-image created is of high quality and resistant to specific image processing attacks. The first step involves using SSA to identify the finest pixels from the cover image. In the subsequent step, PSO is employed to choose the best possible bits from these pixels for message concealment. The proposed approach is evaluated on a set of images and compared to existing methods. Experimental findings demonstrate that the suggested system surpasses previous approaches. The suggested method achieved a PSNR of 84.32279 dB and an MSE of 0.00022505 on the Lena image, a PSNR of 84.68192 dB and an MSE of 0.00021362 on the Pepper image, a PSNR of 84.53469 dB and an MSE of 0.00022125 on Baboon, and a PSNR of 84.25440 dB and an MSE of 0.00023651 on the Airplane image. These results indicate higher visual quality and better preservation of data integrity compared to existing methods.