A useful starting point
For photographs, compare JPEG and WebP at the same dimensions and an acceptable quality. For screenshots, diagrams, text or transparent interface art, try PNG or lossless WebP and inspect the edges closely.
WebP supports alpha transparency and can be a good web delivery format when supported by the audience. HEIC may be a camera capture format but is not universally decodable in web tools; converting it can make sharing easier.
Keep editing and delivery separate
A high-quality source format is useful for later edits. A compressed JPEG or lossy WebP is usually a derivative intended for display, not a master file.
Before publishing, compare byte size, visual quality, animation behavior, transparency and software support at every step from authoring tool through CMS to browser or social destination.
Frequently asked questions
Which is the smallest format?
There is no single smallest format for all images. Content, settings and encoder implementation determine the output.