Facebook用户图像未显示在< img>上标签 [英] Facebook user image not showing on <img> tag
问题描述
我有一个带有这段代码的.ejs页面
< li><%if(userInfo.image == || userInfo.image ==空|| userInfo.image ==未定义){%>
< img src = / assets / img / default.png class = img响应图片边框 alt = /><%} else {%>
< img src =
<%= userInfo.image%> class = img-sensitive pic-bordered alt = /><%}%>
< / li>
userInfo.image值为 http://graph.facebook.com/xxx728122636xxxx/picture?redirect=true&width=432&height=432
,但图片未显示。
示例: https://jsfiddle.net/f6dsp3wd/1/
编辑
好我想通了。正在运行的这台计算机在其浏览器上有一个名为 Ghostery的扩展程序,该扩展程序阻止了Facebook图像的显示。
尝试使用 https://graph.facebook.com/<%= userInfo.id%> / picture?type =正方形
。
I have a .ejs page with this piece of code
<li><% if(userInfo.image=="" || userInfo.image==null || userInfo.image==undefined){ %>
<img src="/assets/img/default.png" class="img-responsive pic-bordered" alt="" /><%}else{%>
<img src="
<%= userInfo.image%>" class="img-responsive pic-bordered" alt="" /><%}%>
</li>
The userInfo.image value is "http://graph.facebook.com/xxx728122636xxxx/picture?redirect=true&width=432&height=432" but the image doesn't show.
example: https://jsfiddle.net/f6dsp3wd/1/
Edit Ok i figured out. This computer im working on has a extension on its browsers named "Ghostery" that was blocking the display of facebook image
you can close this
Try with https://graph.facebook.com/<%= userInfo.id %>/picture?type=square
.
这篇关于Facebook用户图像未显示在< img>上标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!