Recently, short animated image sequences have become very popular in social networks. Most animated images are represented in GIF format. In this paper we propose an animated JPEG format, called aJPEG, which allows the standard JPEG format to be extended in a backward compatible way in order to cope with animated images. After presenting the proposed format, we illustrate it using two prototype applications: the first in form of a GIF-to-aJPEG converter on a personal computer and the second in form of an aJPEG viewer on a smart phone. The paper also reports the performance evaluation of aJPEG when compared to GIF. Experimental results show that aJPEG outperforms animated GIF in both file size overhead and image quality.