The processing capacity and power of nodes in a Wireless Sensor Network (WSN) are restricted. The quality of the images is deficient, and the contents of the images may vary after decoding when we apply image compression algorithms in WSN. Various compression algorithms are compared in this paper. An Image Compression method based on Restricted Boltzmann Machine (RBM), Auto encoders and Non-negative Matrix Factorization (NMF), Least Square Non-Negative Matrix Factorization (LSNMF), Projective Non-Negative Matrix Factorization (PNMF) network are proposed in this paper. For the WSN, we have used a Message Queue Telemetry Transport (MQTT) protocol. We have used a three Raspberry Pi’s to build a WSN; Publisher, Broker, Subscriber. A Publisher, where it can trigger the camera and captures the images then compress it and send it to another raspberry pi which is a MQTT broker. The PSNR values for those image compression methods were analyzed and compared against each other for images evaluated from the MNIST dataset. Along with the simulation results, all these compression methods are implemented using hardware implementation. Raspberry Pi, a single-board computer with in-built Wi-Fi capabilities, was used in establishing a WSN. Message Queue Telemetry Transport (MQTT) protocol was used for transmitting the compressed images across the WSN, that offers fast and reliable transmission