简体   繁体   English

Facebook用户图片未显示 <img> 标签

[英]Facebook user image not showing on <img> tag

I have a .ejs page with this piece of code 我有一个带有这段代码的.ejs页面

<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. userInfo.image的值为“ http://graph.facebook.com/xxx728122636xxxx/picture?redirect=true&width=432&height=432 ”,但图像未显示。

example: https://jsfiddle.net/f6dsp3wd/1/ 示例: 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 我正在使用的这台计算机的浏览器上有一个名为“ Ghostery”的扩展程序,该扩展程序阻止了facebook图像的显示。

you can close this 你可以关闭这个

尝试使用https://graph.facebook.com/<%= userInfo.id %>/picture?type=square

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM