Medical imaging is a rapidly growing field having a high impact on the early detection, diagnosis and surgical planning of diseases. Several imaging techniques such as computed tomography (CT), magnetic resonance imaging (MRI) and ultrasound (US) imaging generate a higher volume of data, necessitating additional storage and communication requirements. Hence, image compression is utilized in medical field to reduce redundancy and alleviate memory and bandwidth issues. This paper presents a novel deep learning-based compression method to reduce the size of medical images. This method employs a deep convolutional neural network for learning compact representations of medical images, then coded by a Huffman encoder. The compression process is reversed to reconstruct the original image. Several tests are conducted to compare the results with other wellknown compression methods. The proposed model achieved a mean peak signal-to-noise ratio (PSNR) of 42.82 dB with storage space saving (SSS) of 96.15% for CT, 43.88 dB with SSS of 96.25% for MRI, 46.29 dB with SSS of 96.07% for US and 43.51 dB with SSS of 96.95% for X-ray images. The findings showed that the proposed compression technique could greatly compress the image size, saving storage space, facilitating better transmission and preserving critical diagnostic information.