For my blog I take a lot of screenshots. By default macOS stores them as PNG. If PNGs eat too much disk space for your taste, switch to JPEG.
Open Terminal and run:
defaults write com.apple.screencapture type JPG
killall SystemUIServer
Works the same for TIFF, GIF or PDF instead of JPG.
From now on, Shift-Command-3 or Shift-Command-4 saves screenshots in the selected format.
Note: JPEG has no transparency. You’ll notice it on screenshots of individual windows.