Improved new header image code