moved image loader to image header and added root dir access in resources