0

I am using angular and I have the following:

<img src="{{image.Url}}" alt="" />

When I validate with W3C I get the following:

Bad value {{image.Url}} for attribute src on element img: Illegal character in path segment: not a URL code point.

And I also get an 404 error until the value is replaced by angular.

How can I solve this?

1 Answer 1

0

Just found a solution:

<img src="http://1x1px.me/FFFFFF-0.png" ng-src="{{image.Url}}" alt="" />

Now the images uses a transparent PNG until its src in not replaced by angular.

It validates and no 404 error anymore.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.