I have a problem with including images in my views using Ruby on Rails Webpacker. When i try to insert image in my view using html img tag and asset_pack_path i got an error. My
For accessing images handled by Sprockets, add this to your your_file_name.js.erb file:
<% helpers = ActionController::Base.helpers %> const railsImagePath = "<%= helpers.image_path('your_image.png') %>"