[英]Facebook user image not showing on <img> tag
我有一個帶有這段代碼的.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>
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=square
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.