HTML Guide
According to the HTML specification, text must not contain control characters other than space characters.
In particular, the control character 
escapes the Unicode control character “CARRIAGE RETURN” are not allowed.
An alternative is using the character reference
which escapes the Unicode control character “LINE FEED” that is defined to be a space character, so it’s allowed in HTML text.
Learn more:
Related W3C validator issues
To fix the issue of having a bad value for the src attribute on an img element due to having a tab, new line, or carriage return, you need to ensure that the src attribute does not contain any additional whitespace characters like tab, new line, or carriage return.
Incorrect code:
<img src="images/example.jpg
" alt="Example Image">
Corrected code:
<img src="images/example.jpg" alt="Example Image">
By removing the extra whitespace characters (new line in this case) and ensuring that the src attribute value is properly enclosed within quotes, the issue should be resolved.