Comment by mcraiha

14 days ago

Tip for all the blog authors, do NOT post code as image. Specially do not add fake editor UI and drop shadow to the image.

In this case 25 lines of code is 50 kB of image binary.

Also it cannot be searched via search engine. Nor can it be read with screen reader.

Pro tip for everybody: do not post any text as images

Never should I receive a Java exception hundreds of lines long as a cut off JPEG file.

Or a screenshot of a Google Sheet missing the information you’re talking to me about.

OCR's come pretty far these days and I can select text off an image with my iPhone processing it locally with a fair bit of success.

As long as such 50kB image doesn’t get replaced with 700kB of javascript bundles for coloring code.

I mean, if such coloring it's going to be done, it should be done with HTML/CSS.

For the OP article, for screenreaders perhaps you are sugesting people to use the alt attribute or similar.