0
私のイメージの重いウェブサイトにhttps://github.com/jassa/lazyload-railsをインストールしようとしています。私は怠け者必要追加するときlazy:Lazyloadの真image gemがRuby on Rails 5の画像を破る
画像は表示されません。真の
構文はRailsの5にRuby用の異なる必要がありますか?
<%= link_to image_tag(post.image_url.to_s, lazy: true), post_path(post), remote: true %>
あなたはjQuery Lazy Load Pluginスクリプトをダウンロードし、下に配置する必要がapplication.html.erb
<script>
$("img").lazyload();
</script>