adapt code for header image