Below are the changes made to send an image with whatsapp.
Special thanks to the SamsonBox changes and the sirpoot.blogspot.nl blog.

python yowsup-cli -JID or GROUP- -filepath of image to send- --config config.example -a

Before you proceed, make sure you install the python image library (pil)

I used the stuff below:
Below are the steps I've taken to install pil on my raspbian pi:
---------------------------------------------------------------------

sudo apt-get build-dep python-imaging
sudo apt-get install libjpeg62 libjpeg62-dev

If you get the error "You must put some 'source' URIs in your sources.list" then make sure that your /etc/apt/sources.list has deb-src entries which match your deb entries.

Then you must symlink the files from their actual location on your server to the location where PIL expects them.
32-bit version

sudo ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib/libz.so
sudo ln -s /usr/lib/i386-linux-gnu/libjpeg.so /usr/lib/libjpeg.so
sudo ln -s /usr/lib/i386-linux-gnu/libfreetype.so /usr/lib/libfreetype.so

64-bit version

sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/libz.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/libjpeg.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/libfreetype.so

Finally, pip install PIL

-------------------------------------------------------------------------------------
sudo pip uninstall pil

wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz
tar xvfz jpegsrc.v8c.tar.gz
cd jpeg-8c
./configure --enable-shared --prefix=$CONFIGURE_PREFIX
make
sudo make install

sudo ln -s /usr/lib/arm-linux-gnueabi/libjpeg.so /usr/lib
sudo ln -s /usr/lib/arm-linux-gnueabi/libfreetype.so /usr/lib
sudo ln -s /usr/lib/arm-linux-gnueabi/libz.so /usr/lib

sudo apt-get install libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev

sudo pip install pil
---------------------------------------------------------------------------------------

apt-get install python-imaging

------------------------------------------------------------------------------------------