By neildaemond, an 'any-stack' hacking grasshopper.
Taking notes while tinkering with:

base64 for html

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.

source: https://stackoverflow.com/questions/16918602/how-to-base64-encode-image-in-linux-bash-shell


#CommandLine