JPEG is a compressed format; it intentionally sacrifices quality for smaller size. It still has its uses, but it should never be used where image quality is the primary concern. There are many widely-adopted alternatives that suit other purposes and have no data loss. One alternative, PNG, is supported everywhere that matters, but there are plenty of others.