Topic: https://brettterpstra.com/2013/07/24/bash-image-tools-for-web-designers/
hide preview

What's next? verify your email address for reply notifications!

Lauri Ranta 11y, 235d ago

You can also use file -Ib (--mime --brief) to get a mime type:

echo "data:$(file -Ib "$1" | sed 's/ //g;s/;charset=binary$//');base64,$(base64 "$1")"

Printing the dimensions of images with ImageMagick:

identify -format '%w x %h' file.png

remark link
hide preview

What's next? verify your email address for reply notifications!

ttscoff 11y, 235d ago

great tips. I didn't know file could do mime type like that.

hide preview

What's next? verify your email address for reply notifications!