###### Abstract  
The Internet of Medical Things (IoMT) is a network of healthcare devices such as wearables, diagnostic equipment, and implantable devices, which are linked to the internet and can communicate with one another. Blockchain (BC) technology can design a secure, decentralized system to store and share medical data in an IoMT-based intelligent healthcare system. Patient records were stored in a tamper-proof and decentralized way using BC, which provides high privacy and security for the patients. Furthermore, BC enables efficient and secure sharing of healthcare data between patients and health professionals, enhancing healthcare quality. Therefore, in this paper, we develop an IoMT with a blockchain-based smart healthcare system using encryption with an optimal deep learning (BSHSH-EODL) model. The presented BSHS-EODL method allows BC-assisted secured image transmission and diagnoses models for the IoMT environment. The proposed method includes data classification, data collection, and image encryption. Initially, the IoMT devices enable data collection processes, and the gathered images are stored in BC for security. Then, image encryption is applied for data encryption, and its key generation method can be performed via the dingo optimization algorithm (DOA). Finally, the BSHS-EODL technique performs disease diagnosis comprising SqueezeNet, Bayesian optimization (BO) based parameter tuning, and voting extreme learning machine (VELM). A comprehensive set of simulation analyses on medical datasets highlights the betterment of the BSHS-EODL method over existing techniques with a maximum accuracy of 98.51%, whereas the existing methods such as DBN, YOLO-GC, ResNet, VGG-19, and CDNN models have lower accuracies of 94.15%, 94.24%, 96.19%, 91.19%, and 95.29% respectively. the risks and vulnerabilities that hinder smart healthcare systems' performance. Also, many more heterogeneous devices collect data that differ in formats and size, making it a challenge to manage the data in the healthcare repositories and secure it from attackers who seek to profit from the data [4]. Therefore, smart healthcare schemes are prone to several security risks and threats, such as network attacks, software and hardware-based attacks, and system-level attacks, which put the lives of patients at risk. Developing technologies, namely blockchain (BC), were utilized for providing cutting-edge solutions in several settings [5], one among them being the healthcare sector. BC technology is used in the medical field to guarantee the security of patient reports and rationalise data sharing amongst pharmaceutical companies, health care providers, and labs [6]. In the medical world, applications (apps) built on BC technology can detect significant and even hazardous errors [7]. Thus, it is capable of enhancing the openness, efficacy, and safety of the systems to exchange healthcare data in the medical field. Medical institutions are aided by BC technology to obtain insight and enhance medical record analysis. Then, the healthcare support system demands a new processing method with delay-sensitive monitoring which should be smart and managed stably [8]. Deep learning (DL) related medical diagnosis in the IoMT signifies the use of machine learning (ML) and artificial intelligence (AI) approaches to examine medical datasets collected from different devices connected to the internet, namely medical equipment and wearable devices [9]. It enhances the precision level of diagnostic decisions, helps identify trends and patterns in patient data, and enables efficient and more personalized healthcare delivery [10]. Simultaneously, hyperparameter tuning of the DL models becomes essential to improve the overall classification performance. Since trial-and-error hyperparameter selection is a challenging task, metaheuristic optimization techniques are used. In addition, image encryption schemes can be used to securely transmit healthcare data in the IoMT encryption.