added support for public directory to load images
added command line support to add new post