Imgur图像未显示在JSFiddle中 [英] Imgur images not showing up in JSFiddle

查看:85
本文介绍了Imgur图像未显示在JSFiddle中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正要问一个有关JSFiddle的问题,但我发现图像(我在Imgur上看到的)没有显示.如果我直接在浏览器中加载图像,然后重新加载小提琴,则会显示图片,但是如果您尚未加载图片,它们将不会显示.有办法解决这个问题吗?还是我只需要将图片托管在其他站点上?

I was about to ask a question about a JSFiddle, and I noticed that the images (which I've got on Imgur) don't show up. If I load the image directly in the browser, and then reload the fiddle the picture shows up, but if you haven't already loaded the pictures they won't display. Is there a way I can fix this? Or do I just need to host the pictures on a different site?

以下是小提琴的链接: http://jsfiddle.net/r4crr/3/

Here's the link to the fiddle: http://jsfiddle.net/r4crr/3/

从小提琴中得到一些愚蠢的代码,它看起来实际上是无关紧要的.

And here's a bit of dumb code from the fiddle that it appears is actually irrelevant.

<div id="makeJSFshowPics">
<img src="http://i.imgur.com/7ftvzYB.png" alt="High Interest"><img src="http://i.imgur.com/u8i9Coo.png" alt="Okay I guess"><img src="http://i.imgur.com/v66NbIR.png" alt="Do Not Want">   

推荐答案

无论出于何种原因,imgur都会阻止jsfiddle(和jsbin)中的图像.也许会有虐待的来临,我不知道为什么.图像基于引用者被阻止.可能会实现旁路,在这种情况下,会将图像加载到伪装了引荐来源网址的iframe中.不过,这似乎有点过头了.出于相同的原因,您可以在访问图像的imgur网址后看到小提琴中的图像,因为它已被缓存.

For whatever reason, imgur is blocking the images from jsfiddle (and jsbin). Perhaps there were abuses coming in, I am not sure as to the why. The images are blocked based on the referrer. It would be possible to implement a bypass where the images were proloaded in an iframe which spoofed the referrer. That seems a little over the top though. It would work for the same reason that you can see the images in the fiddle after you visit the imgur url for the image, because it is cached.

这篇关于Imgur图像未显示在JSFiddle中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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