Developers who spend much of their time building web applications tend to start thinking that all content is text. After all, what does our code really do other than render text to be shuttled back and forth between a web browser and the web server?
As it turns out,
text/html is not the only MIME type that matters on the Web. There are plenty of other types of web content besides text: video files, various document files, and images, for example. Most developers think of images as static content—they’re simply files that are placed in a directory and served up by the web server.
But you, intrepid reader, are not “most developers.” Let’s look at some of the ways in which we can take charge of this binary ...