diff --git a/app/helpers/icon_helper.rb b/app/helpers/icon_helper.rb index 5bd3de5c1..cd3fb0a87 100644 --- a/app/helpers/icon_helper.rb +++ b/app/helpers/icon_helper.rb @@ -15,7 +15,7 @@ module IconHelper def image_icon_tag(filename, class: nil, **options) klass = binding.local_variable_get(:class) - tag.img(src: "/images/#{filename}", class: "icon #{klass}", **options) + image_pack_tag("static/#{filename}", class: "icon #{klass}", **options) end # fontawesome.com/icons/arrow-alt-up diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 0edbd8fb3..0475e322b 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -14,6 +14,8 @@ import morphdom from 'morphdom'; // should start looking for nodejs replacements importAll(require.context('../vendor', true, /\.js$/)); +require.context("../../../public/images", true); + import jQuery from 'jquery'; require("jquery-ui/ui/widgets/autocomplete"); require("jquery-ui/ui/widgets/button"); diff --git a/config/webpacker.yml b/config/webpacker.yml index dbbc80722..ced0a0789 100644 --- a/config/webpacker.yml +++ b/config/webpacker.yml @@ -16,7 +16,7 @@ default: &default # Additional paths webpack should lookup modules # ['app/assets', 'engine/foo/app/assets'] - additional_paths: ["app/components"] + additional_paths: ["app/components", "public/images"] # Reload manifest.json on all requests so we reload latest compiled packs cache_manifest: false