Ruby on rails lazy:Lazyload映像gem的真实性破坏了Ruby on Rails 5的映像

Ruby on rails lazy:Lazyload映像gem的真实性破坏了Ruby on Rails 5的映像,ruby-on-rails,image,rubygems,ruby-on-rails-5,lazy-loading,Ruby On Rails,Image,Rubygems,Ruby On Rails 5,Lazy Loading,我正在尝试为我的图片密集型网站安装 添加所需的lazy:true时,图像不显示 RubyonRails5的语法需要不同吗 <%= link_to image_tag(post.image_url.to_s, lazy: true), post_path(post), remote: true %> application.html.erb <script> $("img").lazyload(); </script> $(“img”).lazylo

我正在尝试为我的图片密集型网站安装

添加所需的lazy:true时,图像不显示

RubyonRails5的语法需要不同吗

<%= link_to image_tag(post.image_url.to_s, lazy: true), post_path(post), remote: true %>
application.html.erb

<script>
   $("img").lazyload();
</script>

$(“img”).lazyload();
您必须下载脚本并将其放在
供应商/assets/javascripts

<script>
   $("img").lazyload();
</script>