Often I see diagrams and flow charts on the web (and as attachments in JIRA or Confluence) saved as JPG or JPEG files and generally speaking that is bad practice. Better to use GIF in most cases. Why?
- GIF is lossless, JPG is 'lossy' - making the picture objects (lines, text, shapes) 'fuzzy' at the edges.
- For diagrams with lots of whitespace (or large areas of solid color), GIF actually compresses better unless you make the JPG completely unreadable by setting the compression extremely high.
The only exception I can think of is if you include photographs or images with gradual shading, but I am willing to listen to any objections
)
Another note on JPG, every time you save a file as JPG in most software, the compression algorithm runs again and you may lose quality even in areas you did not touch. Try to go back to the original source image (or use software with a lossless format) whenever you can!