1
當我現在通過我的模板加載所有的圖像優化的網絡/移動網絡加載圖像時圖像加載如何滾動
//For example, I will just pass the image url into the tempate when the page renders
%div{class: "img_container <%= answer.image_scale %> <%=answer.show_image%>"}
<% if (media_con.standard_resolution) { %>
%a.fancy{href: "<%= media_con.standard_resolution %>"}
%img{src: "<%=media_con.standard_resolution%>"}
我知道做這個(ESP如果我加載很多圖片在頁面上),它會導致移動網絡上效率低下。
我該如何加載圖像只有當它們在視圖中(滾動),也許只是加載縮略圖圖像並加載實際圖像時,圖像的視圖來看。
這裏的任何建議表示讚賞