Resize and turn image into base64 html DOM to save in markdown file.
git clone https://github.com/zhuzilin/base64-img.git
cd base64-img
chmod +x ./base64-img
cp ./base64-img /opt/homebrew/bin/
base64-img -w 400 ~/test.png | pbcopy
NOTE: You may need to change the shabang according to your envivronment.