It all depends. Most of the time I use jpeg for almost everything. The only time I use png is when I need a transparent background. Png can be set on different levels, 8-bit (if I remember correctly, I’m not behind my pc) is usually enough and most of the time as small as a jpeg.
I’m working on my new website and am wondering which format to use for graphics (artwork) and photos - JPG or PNG. I understand that PNG is a lossless compression format and so are much larger. I’ve read that .jpeg should be used with photos and .png for graphics. Is this a good rule of thumb?