Racket allows embedding images in the document source, converting the file to a binary format, which poses challenges for certain tools. The library provides a reader extension to address this, allowing images to be stored within the file. The process involves using a specific format to embed images, with an option to pack images as byte-strings. This method enables easy embedding of images programmatically. Although the error handling is described as subpar, the potential for improvements and extensions is acknowledged. The library can be generalized beyond images to embed any binary data, pointing towards future developments in the tool’s capabilities.
https://github.com/shriram/racket-embed-images-in-source-text