Data stored in the cloud or on mobile devices reside in physical memory systems with finite sizes. Today, huge amounts of analog data, e.g. images and videos, are first digitalized and then compression algorithms (e.g., the JPEG standard) are employed to minimize the amount of physical storage required. Emerging non-volatile-memory (NVM) technologies (e.g., phase change memory (PCM), resistive RAM (RRAM)) provide the possibility to store the analog information in a compressed format directly into analog memory systems. Here, we demonstrate with hardware experiments an image storage and compression scheme (joint source-channel coding) with analog-valued PCM and RRAM arrays. This scheme stores information in a distributed fashion and shows resilience to the PCM and RRAM device technology non-idealities, including defective cells, device variability, resistance drift, and relaxation.