Image cannot be displayed in HTML

拥有回忆 提交于 2020-01-06 20:25:20

问题


I got some encrypted url strings as the src attribute of <img> tags in my html page. For example:

<img src="http://192.168.1.111/business_id/ia8u7Eg8tTVungbUGxVGfh4GYf1tbnh3EyBBmsc1TapqV8/0" />

The link itself can be opened directly by the browser and can be displayed correctly. But this <img> tag in a html page is not displayed correctly with a bad image in the screen. And when I opened this link correctly in the browser, the image will be displayed in the page, apparently this is fetched from the cache.

I have been doing some research, with the developer tools, I track the request of the browser while opening this page. And here is the result:

Just find out may be it is the wrong format that cause this problem. When I opened in the browser, it is parsed correctly to jpeg:

Question is why is this happening? What can I do to fix this? I don't know the format, the server does. Suppose I want to specify the encoding of the src in <img> as jpeg programmatically , is this possible?

来源:https://stackoverflow.com/questions/17769868/image-cannot-be-displayed-in-html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!