This research suggests a unique picture encoding technique based on OFT and block-based transformation in order to communicate image data over an open network. First, a transformation technique was used to create a transformed picture, and then an optical Fourier transform (OFT) algorithm was used to encode the newly-created encrypted version of the converted image. The suggested method’s security relies on the alteration algorithm, sensitivity to the randomness of the phase mask, and the order of OFT. The method has been shown to be beneficial in theoretical and experimental studies. As a result of the implementation, the maximum and minimum UACI (unified average changed intensity) and pixel rate (NPCR). A foundation for future research and a framework for new researchers have been laid down in this study.