Spree Commerce logo

Spree Commerce

Open-source headless ecommerce platform with a REST API and Next.js storefront

Alternative to: Shopify, Magento, WooCommerce, Salesforce Commerce Cloud

Spree Commerce screenshot

About Versions (100)

v5.2.2

2025-12-09

Image processing in background jobs

Now, when an image is uploaded, Spree automatically generates optimized versions in the background, so they’re ready to serve immediately without on-demand processing. You can still generate on-the-fly variants if you wish, but we recommend using the preprocessed named variants for optimal performance.

This greatly speeds up Product Listing Pages and reduces load on the web application. For products, we have a set of 5 predefined image variations, which, of course, you can customize.

To use named variants in your views, you need to change your code from:

<%= spree_image_tag(image, width: 64, height: 64) %>

to

<%= spree_image_tag(variant: :mini) %>

Old code, with width/height as parameters, will work as before, so these changes are optional if you want to improve the speed of your application.

Documentation

Dependencies 2.0

We’ve greatly improved developer experience working with Spree Dependencies. Now it’s easier to set and access dependencies, eg.

Spree.cart_add_item_service = MyAddToCartService

When accessing, you don’t need to call constantize anymore,

Spree.cart_add_item_service.call(order: order, variant: variant, quantity: quantity, options: options)

There are also 3 new helpful rake tasks:

bin/rake spree:dependencies:list # will list all available dependencies and their current values
bin/rake spree:dependencies:overrides # will list only dependencies that were overriden in your app and/or extensions
bin/rake spree:dependencies:validate # will validate if all dependencies are valid classes

We recommend checking the documentation for full picture.

Other changes

Core

API

Admin

Storefront

Documentation

Full Changelog: https://github.com/spree/spree/compare/v5.2.1…v5.2.2