1) Adding functionality to add the appropriate image type on button click.
Note: Some issues with Layout. has been hacked for now.