I needed to store a large quantities of images so took the following measurements:

Format Time Size Sample
bmp0.7156701769526
gif4.184417501931
jpg2.50781122252
png10.90944267295
ppm0.6485401769488 Browser does not support PPM
tiff1.0112161769600 Browser does not support TIFF

Gif is the clear loser - it takes a long time to process but still looks terrible.
For space use jpeg, speed ppm.

Google’s new WebP format looks promising.