If it is a normal photo
Use JPG for broad upload compatibility. Use WebP for website performance when the destination supports it. Convert HEIC or AVIF to JPG when compatibility is the problem.
If it has text or transparency
Use PNG for screenshots, graphics, transparent backgrounds, logos, and UI images. Use WebP when you want modern web compression with strong visual quality.
If the image is a document
Use PDF when a scan, receipt, form, or screenshot should be submitted as a document rather than a standalone image.