Koken is a free and self-hosted CMS (PHP-MySQL) that is focused on building websites where portfolio/gallery is in the core (like designer or photographer sites). The application has a powerful media manager for the images and videos. It allows organizing items as categories, date captured, license and more.
It has a simple and flexible content editor that allows editing with live previews. Also, inserting media, slideshows or social content (like tweets, Flickr, Instagram and Vimeo) is possible.
Koken has a templating engine for building new themes. And, it is currently in beta but will soon have plugins for extending further.
Also, for Adobe Lightroom users, there is a free “ publish services” plugin for easily updating, editing and replacing content.