Define asset_tag_helper.rb
in your rails_root/config/
.
When you use image_tag
helper in view files, it will be added loading="lazy"
automatically.
If you don't want to use lazy loading, add option loading: "eager"
or use rails_image_tag
.
ref: