A Python RFC2397 ("data url") implementation
The rationale behind this package is described in this blogpost.
Python 2.6 and 2.7, not tested on Python 3+ (yet).
$ pip install rfc2397
An executable named
rfc2397 is then placed in the python environment
pip installs to.
As an alternate method, it’s also possible to copy the rfc2397.py file to any location and run the script stand-alone.
rfc2397 a path to an image file.
rfc2397 uses Python’s
mimetypes module to determine what MIME-type a file has (N.B:
the program won’t stop you from encoding something too large/an
$ rfc2397 dot.png # <- your image path data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQImWP4o8oAAANCASIYayeeAAAAAElFTkSuQmCC
Concept and initial coding.