By neildaemond, an 'any-stack' hacking grasshopper.
Taking notes while tinkering with:
base64 for html
Thu, Sep 21, 2017 in /quick-tips/
the following commands mentioned on this post on stackoverflow can generate base64 encoded image for use in html.
file="DSC_0251.JPG" type=$(identify -format "%m" "$file" | tr '[A-Z]' '[a-z]') echo "data:image/$type;base64,$(base64 -w 0 "$file")"
It’s just a task that I need from time to time.