This paper addresses the scientific problem of enhancing the security and capacity of steganographic methods for protecting digital media. The primary aim is to develop an advanced steganographic technique that optimizes quantization tables to surpass the traditional F5 algorithm in terms of security, capacity, and robustness. The novelty of this research lies in the introduction of the F5A method, which utilizes optimized quantization tables to significantly increase the capacity for concealed information while ensuring high-quality image retention and resistance to unauthorized content recovery. The F5A method integrates cryptographic keys and features to detect and prevent copyright infringement in real time. Experimental evaluations demonstrate that the F5A method improves the mean square error and peak signal-to-noise ratio indices by 1.716 and 1.121 times, respectively, compared to the traditional F5 algorithm. Additionally, it increases the steganographic capacity by up to 1.693 times for smaller images and 1.539 times for larger images. These results underscore the effectiveness of the F5A method in enhancing digital media security and copyright protection.