You're underestimating the number of non-photographic JPEG files in use despite lacking transparency. It appears a significant number of people don't care about artifacts.
That said, JPEG does today support lossless compression, if you really want to go there. It sort of even supports transparency[1].
That said, JPEG does today support lossless compression, if you really want to go there. It sort of even supports transparency[1].
[1] https://hackernews.hn/item?id=1772760 for a javascript solution; other approaches use container formats