Reputation: 155
The following image shows as a broken image but when I put the URL in my browser it works fine. After I access the image through my browser VIA url, the image is cached and the image tag starts to work but once I clear my cache the image is broken again. Can someone help me with this issue?
<img src="http://www.rktteam.vastserve.com/Brawlhalla-660x330.png" style="background-color: initial;">
I don't think its the HTTPS/HTTP mismatch issue. On the left is a broken image with HTTP URL (it works when you access it in your browser). On the right is another image with HTTP but it works even after I clear my cache.
See the full html here. https://www.rkt-team.com/events/32
Upvotes: 1
Views: 2425
Reputation: 1
first check in the network tab if the requests to the image are successful. In my case the request to image was blocked due to inappropriate header and I fix i t using this link How to prevent ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep?
Upvotes: 0
Reputation: 155
I wasn't able to fix this. The problem had to do with http://www.uhostall.com/. However I was able to do a work around. I changed my host to 000webhost and I am no longer getting this problem.
Upvotes: 0
Reputation: 4049
When the browser requests the image, what the server returns is not an image at all - the MIME type is returned as text/html.
Investigate the server if you want to find out why it's doing it.
Upvotes: 0
Reputation: 862
It could be a problem with your output buffer. Is it built using php? Have you tried ob_clean()?
Upvotes: 0
Reputation: 5003
You link to a site using the https
protocol, but the img you've referenced uses the http
protocol. Due to security reasons you must not load unsecure (http) content, in an https site.
Change http
to https
or the other way round.
Upvotes: 3