diff --git a/app/views/admin/producer_properties/_form.html.haml b/app/views/admin/producer_properties/_form.html.haml index fa05e25b6875..7af322557d3a 100644 --- a/app/views/admin/producer_properties/_form.html.haml +++ b/app/views/admin/producer_properties/_form.html.haml @@ -1,6 +1,6 @@ %fieldset.no-border-top .add_producer_properties{"data-hook" => "add_producer_properties"} - = image_pack_tag 'spinner.gif', :plugin => 'spree', :style => 'display:none;', :id => 'busy_indicator' + = image_tag 'spinner.gif', :plugin => 'spree', :style => 'display:none;', :id => 'busy_indicator' %table.index.sortable{"data-hook" => "", "data-sortable-link" => main_app.update_positions_admin_enterprise_producer_properties_url(@enterprise)} %thead %tr{"data-hook" => "producer_properties_header"} diff --git a/app/views/components/_spinner.html.haml b/app/views/components/_spinner.html.haml index a3dee8a29824..8d0a371204a0 100644 --- a/app/views/components/_spinner.html.haml +++ b/app/views/components/_spinner.html.haml @@ -1 +1 @@ -%img.spinner{ src: image_pack_path("spinning-circles.svg"), style: "max-width: 100%" } +%img.spinner{ src: image_path("spinning-circles.svg"), style: "max-width: 100%" } diff --git a/app/views/home/_tagline.html.haml b/app/views/home/_tagline.html.haml index 245d07263a4f..b20a3dc79946 100644 --- a/app/views/home/_tagline.html.haml +++ b/app/views/home/_tagline.html.haml @@ -2,7 +2,7 @@ .row .small-12.text-center.columns %h1 - %img{src: image_pack_path("logo-white-notext.png"), title: Spree::Config.site_name} + %img{src: image_path("logo-white-notext.png"), title: Spree::Config.site_name} %br/ %a.button.transparent{href: "/shops"} = t :home_shop diff --git a/app/views/layouts/registration.html.haml b/app/views/layouts/registration.html.haml index 30e6297fca0a..0baff6a1529e 100644 --- a/app/views/layouts/registration.html.haml +++ b/app/views/layouts/registration.html.haml @@ -18,7 +18,7 @@ = csrf_meta_tags - %body.off-canvas{ style: "background-image: url(#{image_pack_path('tile-wide.png')})", "data-turbo": "false" } + %body.off-canvas{ style: "background-image: url(#{image_path('tile-wide.png')})", "data-turbo": "false" } .off-canvas-wrap{offcanvas: true} .inner-wrap diff --git a/app/views/producers/_fat.html.haml b/app/views/producers/_fat.html.haml index 4f10a189fba4..bffcf5b28c21 100644 --- a/app/views/producers/_fat.html.haml +++ b/app/views/producers/_fat.html.haml @@ -40,7 +40,7 @@ %p.word-wrap{"ng-if" => "::producer.whatsapp_phone"} %a{"ng-href" => "{{::producer.whatsapp_url}}", target: "_blank"} - %img{ src: image_pack_path("social-logos/whatsapp.svg") } + %img{ src: image_path("social-logos/whatsapp.svg") } %span{"ng-bind" => "::producer.whatsapp_phone"} %p.word-wrap{"ng-if" => "::producer.email_address"} diff --git a/app/views/registration/steps/_limit_reached.html.haml b/app/views/registration/steps/_limit_reached.html.haml index 7a486e574353..ba49d0dac388 100644 --- a/app/views/registration/steps/_limit_reached.html.haml +++ b/app/views/registration/steps/_limit_reached.html.haml @@ -6,7 +6,7 @@ %h4= t(".message") .row .small-12.medium-3.large-2.columns.text-right.hide-for-small-only - %img{:src => image_pack_path("potatoes.png") } + %img{:src => image_path("potatoes.png") } .small-12.medium-9.large-10.columns %p = t(".text") diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml index 4d6723892d9c..899d3ace489e 100644 --- a/app/views/shared/_footer.html.haml +++ b/app/views/shared/_footer.html.haml @@ -3,7 +3,7 @@ .row .small-12.columns.text-center .logo - %img{src: image_pack_path("logo-white-notext.png") } + %img{src: image_path("logo-white-notext.png") } .row .small-12.medium-8.medium-offset-2.columns.text-center .alert-box diff --git a/app/views/shared/menu/_cart.html.haml b/app/views/shared/menu/_cart.html.haml index 728b0c1daaab..1fd1b06e89f4 100644 --- a/app/views/shared/menu/_cart.html.haml +++ b/app/views/shared/menu/_cart.html.haml @@ -3,6 +3,6 @@ %span = t '.cart' %span.count - %img{ src: image_pack_path("menu/icn-cart.svg") } + %img{ src: image_path("menu/icn-cart.svg") } %span {{ Cart.total_item_count() }} diff --git a/app/views/shared/menu/_mobile_menu.html.haml b/app/views/shared/menu/_mobile_menu.html.haml index aca1fa70d6d2..50a0800d2812 100644 --- a/app/views/shared/menu/_mobile_menu.html.haml +++ b/app/views/shared/menu/_mobile_menu.html.haml @@ -1,7 +1,7 @@ %nav.tab-bar.show-for-medium-down %section.left %a.left-off-canvas-toggle.menu-icon - = image_pack_tag "menu/btn-menu-mobile.png" + = image_tag "menu/btn-menu-mobile.png" %section.left .ofn-logo @@ -14,7 +14,7 @@ %span = t '.cart' %span.count - = image_pack_tag "menu/icn-cart.svg" + = image_tag "menu/icn-cart.svg" %span {{ Cart.total_item_count() }} diff --git a/app/views/shared/menu/_signed_in.html.haml b/app/views/shared/menu/_signed_in.html.haml index 34b7bcfc066a..dceb81075aeb 100644 --- a/app/views/shared/menu/_signed_in.html.haml +++ b/app/views/shared/menu/_signed_in.html.haml @@ -7,7 +7,7 @@ %li.user-menu.has-dropdown.not-click %a{href: "#", class: "top-bar--menu-item-with-icon"} - %img{ src: image_pack_path("menu/icn-profile.svg") } + %img{ src: image_path("menu/icn-profile.svg") } %span = t '.profile' diff --git a/app/views/shared/menu/_signed_out.html.haml b/app/views/shared/menu/_signed_out.html.haml index 570c707b31a2..a576ded18858 100644 --- a/app/views/shared/menu/_signed_out.html.haml +++ b/app/views/shared/menu/_signed_out.html.haml @@ -1,5 +1,5 @@ %li#login-link{ "data-controller": "login-modal" } %a{"auth": "login", "data-action": "click->login-modal#call" } - %img{ src: image_pack_path("menu/icn-login.svg") } + %img{ src: image_path("menu/icn-login.svg") } %span = t 'label_login' diff --git a/app/views/shop/products/_searchbar.haml b/app/views/shop/products/_searchbar.haml index a17db1e322b4..bda087f4c7cc 100644 --- a/app/views/shop/products/_searchbar.haml +++ b/app/views/shop/products/_searchbar.haml @@ -8,7 +8,7 @@ "ng-debounce" => "200", "disable-enter-with-blur" => true} %a.clear{type: 'button', ng: {show: 'query', click: 'clearQuery()'}, 'focus-search' => true} - = image_pack_tag "icn-close.png" + = image_tag "icn-close.png" .hide-for-large-up %button{type: 'button', ng: {click: 'toggleFilterSidebar()'}} diff --git a/app/views/shopping_shared/tabs/_contact.html.haml b/app/views/shopping_shared/tabs/_contact.html.haml index cbad4a196685..14a941214be7 100644 --- a/app/views/shopping_shared/tabs/_contact.html.haml +++ b/app/views/shopping_shared/tabs/_contact.html.haml @@ -28,7 +28,7 @@ %br - if current_distributor.whatsapp_phone.present? %a{href: current_distributor.whatsapp_url, target: "_blank" } - %img{ src: image_pack_path("social-logos/whatsapp.svg") } + %img{ src: image_path("social-logos/whatsapp.svg") } = current_distributor.whatsapp_phone %br - if current_distributor.website.present? diff --git a/app/views/spree/admin/payments/source_forms/_gateway.html.haml b/app/views/spree/admin/payments/source_forms/_gateway.html.haml index ac20d736097d..ac88ecd04783 100644 --- a/app/views/spree/admin/payments/source_forms/_gateway.html.haml +++ b/app/views/spree/admin/payments/source_forms/_gateway.html.haml @@ -41,5 +41,5 @@ %a.info.cvvLink{href: "/content/cvv", target: "_blank"} (#{t(:what_is_this)}) .nine.columns - = image_pack_tag 'credit_cards/credit_card.gif', class: 'credit-card-image' + = image_tag 'credit_cards/credit_card.gif', class: 'credit-card-image' .clear diff --git a/app/views/spree/admin/product_properties/index.html.haml b/app/views/spree/admin/product_properties/index.html.haml index 12660fc2cd41..1bd9531fab1e 100644 --- a/app/views/spree/admin/product_properties/index.html.haml +++ b/app/views/spree/admin/product_properties/index.html.haml @@ -12,7 +12,7 @@ = form_for @product, url: admin_product_url(@product, @url_filters), method: :put do |f| %fieldset.no-border-top .add_product_properties - = image_pack_tag 'select2-spinner.gif', plugin: 'spree', style: 'display:none;', id: 'busy_indicator' + = image_tag 'select2-spinner.gif', plugin: 'spree', style: 'display:none;', id: 'busy_indicator' %table.index.sortable{"data-sortable-link" => update_positions_admin_product_product_properties_url} %thead diff --git a/app/views/spree/admin/states/index.html.haml b/app/views/spree/admin/states/index.html.haml index b9e72fa193fc..57035c79af7e 100644 --- a/app/views/spree/admin/states/index.html.haml +++ b/app/views/spree/admin/states/index.html.haml @@ -11,6 +11,6 @@ - databaseurl = "#{admin_states_path(format: :js)}?country_id=" %select#country.observe_field.select2.fullwidth{"data-base-url" => databaseurl, "data-update" => "#state-list"} = options_from_collection_for_select(@countries, :id, :name, @country.id) -= image_pack_tag 'select2-spinner.gif', plugin: 'spree', style: 'display:none;', id: 'busy_indicator' += image_tag 'select2-spinner.gif', plugin: 'spree', style: 'display:none;', id: 'busy_indicator' #state-list = render partial: 'state_list' diff --git a/config/initializers/webpack.rb b/config/initializers/webpack.rb deleted file mode 100644 index 4ccf08144e51..000000000000 --- a/config/initializers/webpack.rb +++ /dev/null @@ -1,10 +0,0 @@ - -module WebpackImageExtension - def image_pack_path(image) - # The Webpacker::Helper#resolve_path_to_image method is incredibly useful - # for nicely fetching Webpacker image paths, but it's private. - resolve_path_to_image(image) - end -end - -Webpacker::Helper.include WebpackImageExtension