Install base64 software:

opkg update
opkg install coreutils-base64

Download test image:

cd /mnt/sda1/
wget -O uno.jpg http://www.adafruit.com/images/970x728/50-01.jpg
nano /mnt/sda1/upload.sh
#!/bin/ash
strbase64=$(/usr/bin/base64 --wrap=0 /mnt/sda1/uno.jpg)
echo "{\"image\":\""+$strbase64+"\"}" > /mnt/sda1/test.base64
curl -k -X PATCH  -d @/mnt/sda1/test.base64   'https://shms.firebaseio.com/images/image.json'
chmod 755  /mnt/sda1/upload.sh
/mnt/sda1/upload.sh

Hide standard and error outputs:

curl -k  -X PATCH  -d @/mnt/sda1/test.base64 'https://shms.firebaseio.com/images/image.json' > /dev/null 2>&1