Just wanted to share a wee script I wrote to make incorporating PNG images into dashboards easier from a Mac.
Usage: b64_encode_image.sh filename
The converted file and start/end identifiers are copied to your MacOS clipboard and can be pasted directly into a text box.
Hope this helps!
if [ $# -eq 0 ]; then
echo "Error: No filename provided"
echo "Usage: b64_encode_image.sh <filename>"
echo "!(data:image/png;base64," > ./b64.tmp
openssl base64 -in "$filename" >> ./b64.tmp
echo ")" >> ./b64.tmp
cat ./b64.tmp | pbcopy
rm -f ./b64.tmp