Overview
This guide explains how to change Product Images dimensions and different storage options for ActiveStorage which is the default attachment storage system in Spree.Dimensions
To change the default image dimensions or add new ones you need to create a decorator file:Using image variations in templates
You can also create image variations on the fly in your templates, eg.Storage service
By default Spree will use the storage service you have set in your environment file eg.config/environments/development.rb
:
config/initializers/spree.rb
:
config/storage.yml
.
Using CDNs
To use a CDN service such as AWS Cloudfront or Cloudflare, you need to setSpree.cdn_host
to the hostname of your CDN service. This is done in the config/initializers/spree.rb
:
cdn_image_url
helper: