gif:
This is a good format for images with solid flat colors or sharp and distinctive edges, such as text and line art. The gif format allows more control over each individual pixel. The gif format can be made into a transparent version of the graphic.
example/gif
jpeg:
This format is usually a better file format to be used for photographs. The jpeg format gives better control over quality of the photo in relationship to compression of the photo. Transparency does not function with jpeg format.
example/jpeg

Whether you are using the gif format or the jpeg format, do not turn gif files into jpegs or vice versa.