How does thumbnails settings and changes work in Spree?

e-commerce, imagemagick, ruby-on-rails, spree, thumbnails

Solution

Go to the Spree Administrator Dashboard > Configurations > Image Settings. Click edit and change the paperclip styles field and click update.

Run the command.

bundle exec rake paperclip:refresh:thumbnails class=Spree::Image

You would not need to re-upload the images that are already there, the rake command would re-generate the thumbnails.

Problem

I'm building my first Spree application and my own layout/theme for it. I need to change thumbnail sizes for products and have been directed differently, mostly it seems to be an unpopular subject. How does this work and how do I change it? Spree configuration config/initializers/spree_config.rb ``` Spree::Config.set( attachment_styles: "{ \"mini\":\"48x48>\", \"small\":\"110x110>\", \"product\":\"340x340>\", \"large\":\"650x650>\" }" ) ``` That is how I tried it the first time - no effect. Clearing cache I tried to clear the cache like so: `rake tmp:clear` which gave no result. Re-upload? I tried re-uploading some images to force a re-generation of thumbnails and there was results but not for all sizes. For instance, there seems to be really hard to create a 340x340 px image for 'product' size. What I'm after is a way to re-generate all thumbnails according to my own defined sizes. `ruby 1.9.3p194 | Rails 3.2.8 | Spree 1.2.0`

Original source