[Tex/LaTex] How to remove the horizontal line below the image in the header

fancyhdrheader-footerrules

To add image in the header , I have written the code, basically the pagestyle modification. Now , just for a trial , I first modified only my plain page style. After the image gets inserted in the header , I get a horizontal line, How do I remove it?

Here is the MWE:

\documentclass[12pt]{book}
\usepackage{lipsum}
\usepackage{wallpaper}  
\usepackage{fancyhdr}

\fancypagestyle{plain}{
 \fancyhf{}
 \fancyhead[C]{\includegraphics[scale=.25]{example-image-a}}
}

\begin{document}
\chapter{A Chapter}
\lipsum[4]
\section{blah blah blah}
\end{document}

Best Answer

You have to declare that you want a header line with no width:

\renewcommand{\headrulewidth}{0pt}

MWE:

\documentclass[12pt]{book}
\usepackage{lipsum}
\usepackage{wallpaper}
\usepackage{fancyhdr}

\fancypagestyle{plain}{
 \fancyhf{}
 \fancyhead[C]{\includegraphics[scale=.25]{example-image-a}}
 \renewcommand{\headrulewidth}{0pt}
}

\begin{document}
\chapter{A Chapter}
\lipsum[4]
\section{blah blah blah}
\end{document} 

Output:

enter image description here

Related Question