Added an imgbase to the config for automatically generated images and a JS snippet to convert source names