Spree replaces standard image / noimage

I am working on a Rails project that includes Spree 1.3.2, and I need to change the default image (noimage) in Spree, but have not yet found a way to do this. I looked through the documentation, went through the admin section, but everything failed.

I redefined the default layouts for Spree templates with Slim using the same name. I found noimage in the app\assets\images\noimage\ folder in the source. So I created a path and copied my own images. But the image link still shows the old ugly default image.

How can I do that? I don't like editing main files, something like overriding would be great.

+6
source share
1 answer

To override a replacement image without an image. Create the following folder in the rails project

 app/assets/images/noimage 

Create the following image files with the file extension png. The name and file extension are critical, otherwise you would not override the default version of the spree version

  • large.png
  • mini.png
  • product.png
  • small.png

Make sure you match the default resolution of the images when you create assets without an image.

 large(240x240) mini(48x48) product(240x240) small(100x100) 
+16
source

Source: https://habr.com/ru/post/944321/


All Articles