Why is my gif image sent from servlet not animating?
I have this following code in my servlet response.setContentType("image/gif"); String filepath = "PATH//TO//GIF.gif"; OutputStream out = response.getOutputStream(); File f = new File(filepath); BufferedImage bi = ImageIO.read(f); ImageIO.write(bi, "gif", out); out.close(); This code is just returning first frame of the image. How to achieve returning full GIF image ? haraldK Your GIF does not animate, because you are sending only the first frame to the client. :-) Actually, you are, because ImageIO.read reads only the first frame (and a BufferedImage can only contain a single frame/image). You