Download Latest Version v5.2.2 source code.tar.gz (54.2 MB)
Email in envelope

Get an email when there's a new version of Spree Commerce

Home / v5.2.2
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2025-12-09 2.9 kB
v5.2.2 source code.tar.gz 2025-12-09 54.2 MB
v5.2.2 source code.zip 2025-12-09 56.3 MB
Totals: 3 Items   110.5 MB 0

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:

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

to

:::erb
<%= 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.

:::ruby
Spree.cart_add_item_service = MyAddToCartService

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

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

There are also 3 new helpful rake tasks:

:::bash
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

Source: README.md, updated 2025-12-09