在img标签中使用时,外部图像不显示 [英] External Images does not display when used in img tag

查看:60
本文介绍了在img标签中使用时,外部图像不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这些奇怪的图片网址,如果我在浏览器中直接调用,则会显示图片,但是当在img标签中使用它时,则不会显示图片.

I have these strange image urls that if I call direct in browser, an image shows up but when I use it in an img tag no image shows up.

http://thetvdb.com/banners/_cache/fanart/original/248951-1.jpg

我确定我犯了一些愚蠢的错误.这是简单的代码.

I'm sure I'm making some silly mistake. Here is simple code.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org
/TR/html4/loose.dtd">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title></title>
</head>
<body>
    <img src="http://thetvdb.com/banners/_cache/fanart/original/248951-1.jpg" alt=""/>
</body>
</html>

有帮助吗?

推荐答案

电视数据库不希望使用其带宽在您的网站上显示图片.

The TV DB does not want to use their bandwidth to display an image on your site.

我们不允许任何形式的热链接,只允许您直接下载图像,然后根据需要使用它们,而您不能将我们用作主机.

We don't allow any kind of hotlinking, you are only allowed to directly download the images and then use them as you see fit, you may not use us as a host.

他们已采取措施阻止您这样做.

They have taken steps to prevent you from doing this.

quentin@laptop:~ # curl -e http://example.com/ http://thetvdb.com/banners/_cache/fanart/original/248951-1.jpg
<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>

这篇关于在img标签中使用时,外部图像不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆