3 ms·
JPEG is the absolute worst possible solution here. If MathML or similar is not supported, use an SVG or PDF so that it's zoomable and not made of pixels. It's a
by rjmunro 2y ago
JPEG is the absolute worst possible solution here. If MathML or similar is not supported, use an SVG or PDF so that it's zoomable and not made of pixels. It's also slightly readable by screen readers (although you probably want some sort of alt-text for those anyway).
If no vector formats are supported, use PNG, or another "lossless" format not JPEG. JPEG's compression is designed for photos where the probability of 2 neighbouring pixels being the same is tiny. Note that PNG doesn't have to be lossless - if you want to shrink the file size you can reduce the resolution or the colour space.
Even GIF is a much better choice than JPEG for a diagram, mathematical formula or logo with hard edges and a small number of colours. SVG is usually the right choice, (but don't do what one designer did for me and embed a JPEG in an SVG instead of giving me an SVG direct from Illustrator or Inkscape).