Spree replace default Image / noimage
Asked Answered
F

1

7

I am working on a Rails project which involves Spree 1.3.2 and I need to change the default image (noimage) in Spree, but so far found no way to do it. I searched through the documentation, went through the admin section, but all failed.

I have been overriding the default layouts for Spree with Slim templates by following the same name. I located the noimage in app\assets\images\noimage\ folder in the source. So I created the path and copied my custom images there. But the image link still shows the old ugly spree default image.

How can this be accomplished? I do not like to edit core files, something like an override would be great.

Flittermouse answered 5/5, 2013 at 18:47 Comment(1)
The answer worked for me - is there anything stopping you accepting it?Arlinda
T
20

To override the no-image placeholder of spree. Create the following folder in your rails project

app/assets/images/noimage

Create the following image files with the png file extension. The name and file extension is crucial here otherwise you wouldn't override spree's default version

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

Make sure you matched the resolution of the spree's default images when you are creating the no-image assets.

large(240x240)
mini(48x48)
product(240x240)
small(100x100)
Trunnion answered 1/8, 2013 at 11:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.