MattBlack MattBlack - 5 days ago 5
HTML Question

HTML img src not absolute

I have an image within an iframe:

<img src="www.******.co.uk/payroll3/images/member.png" height="100" width="100">


The image doesn't load, when I select the image address when its run in the browser it shows that it is trying to get the image from the directory below rather than the one specified in the img tags.

http://www.****.co.uk/payroll3/backend/www.asmserver.co.uk/payroll3/images/member.png


It appears to be appending a base url..

Does anyone have any idea why this is happening and how I stop this from happening?

Answer

Just use fully qualified web address with "http://" or "https://" if its secure that will solved your problem like,

<img src="http://******.co.uk/payroll3/images/member.png" height="100" width="100">
Comments