Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fixes PLP Images URLs

Damian Legawiec115ade3bd662
diff --git a/frontend/app/helpers/spree/frontend_helper.rb b/frontend/app/helpers/spree/frontend_helper.rb
index 317dafea3a..a6764fb9f7 100644
--- a/frontend/app/helpers/spree/frontend_helper.rb
+++ b/frontend/app/helpers/spree/frontend_helper.rb
@@ -166,7 +166,13 @@ module Spree
def plp_and_carousel_image(product, image_class = '')
image = default_image_for_product_or_variant(product)
- image_url = image&.plp_url || asset_path('noimage/plp.png')
+
+ image_url = if image.present?
+ main_app.url_for(image.url('plp'))
+ else
+ asset_path('noimage/plp.png')
+ end
+
image_style = image&.style(:plp)
lazy_image(