Highlights
Product variant images
This release introduces images on product variants. It is now possible to assign images to individual product variants, enabling fully scoped variant-specific photos. In addition to this, a variant can have a thumbnail among its associated images.
The behavior of images is as follows:
- Images are added to products
- Variant images are chosen among the product images
- Upon retrieving variants, the variant images will contain:
- Product images that are not associated with any variants
- Images that are associated with the variant
For example, let's imagine you have three product images:
- White t-shirt
- Black t-shirt
- T-shirt on a model
You want to share the third image across variants, and have the white image on the white variants and black image on the black variants. To achieve this, you associate the white t-shirt image with the white variants, and the black t-shirt image with the black variants. The third image should have no associated variants.
This in turn would result in the following response on variants:
{
"id": "prod_1234",
"variants": [
{
"id": "var_1234",
"title": "White t-shirt"
"images": [
{ "id": "img_1234", "url": "http://images.com/white-t-shirt.png" },
{ "id": "img_1234", "url": "http://images.com/t-shirt-on-model.png" }
]
},
{
"id": "var_4321",
"title": "Black t-shirt"
"images": [
{ "id": "img_1234", "url": "http://images.com/black-t-shirt.png" },
{ "id": "img_1234", "url": "http://images.com/t-shirt-on-model.png" }
]
},
]
}Managing variant images
Two endpoints have been added:
POST /admin/products/:id/variants/:variant_id/images/batch— Batch manage image associations for a specific variant.POST /admin/products/:id/images/:image_id/variants/batch— Batch manage variant associations for a specific image.
Admin UI
You can manage product variant images from the product page in the admin dashboard. There are two ways to manage these.
From the root-level product page, you can associate a single image with many variants:
From the variant-specific page, you can associate many images with a single variant:
Data model changes
The following are changes to the data models in the Product Module required to enable this feature:
- ProductVariant now includes a many-to-many relationship with ProductImage.
- A new ProductVariantProductImage pivot entity manages these associations.
Therefore, please make sure to run migrations after upgrading to the new version:
npx medusa db:migrateIndex management API
This release adds a new API for managing the index, enabling you to trigger synchronization and retrieve detailed information about the last sync. The update improves visibility and control over the indexing process.
API
GET /admin/index/details— Retrieve index metadata, including entity type, status, last synced key, and last update timestamp.POST /admin/index/sync— Trigger synchronization from last synced data- Supports optional options:
{ strategy: "full" }— Perform a full sync{ strategy: "reset" }— Truncate tables and perform a fresh sync.
- Supports optional options:
Faster price updates
This release brings performance improvements to the Pricing Module, significantly speeding up price list and price set updates. The changes focus on optimizing database queries, reducing redundant computations, and streamlining price normalization and upsert operations.
Features
- feat(core-flows,product,types): scoped variant images by @fPolic in #13623
- feat(medusa,types): product variant store endpoints by @fPolic in #13730
- feat(product): build variant images when retrieving product by @fPolic in #13731
- feat(index): Add http/module api to interact with the index engine by @adrien2p in #13869
- feat: Implement medusa payments provider by @sradevski in #13772
- feat(dashboard): variant images list thumbnail + refactor form state management by @fPolic in #13905
Bugs
- use truncate in db teardown by @peterlgh7 in #13875
- fix(dashboard): preserve old image ids when deleting a product image by @fPolic in #13881
- fix(pricing): price list prices perf issues by @adrien2p in #13899
- chore(): Generate migrations with correct mikro orm import path by @adrien2p in #13893
- fix: allow controlling hmr bind host by @srindom in #13692
- fix(utils): db migration big number default value by @carlos-r-l-rodrigues in #13913
- chore(): Throw on migration up/down fail by @adrien2p in #13911
Documentation
- docs: fix spelling and grammar by @MBLVD in #13862
- docs: documented admin translations by @shahednasser in #13864
- docs: fix runtime error occuring with code tabs by @shahednasser in #13873
- Add PG_CONNECTION to Medusa Container docs by @NicolasGorga in #13871
- docs: fix mikro-orm imports from framework by @shahednasser in #13885
- docs: category images guide by @shahednasser in #13755
- docs: fix category images guide by @shahednasser in #13908
- docs: serve markdown to AI agents by @shahednasser in #13915
- docs: updated user stories in /learn by @cboeddek in #13866
Chores
- chore(docs): Update version in documentation (automated) by @github-actions[bot] in #13854
- chore(docs): Generated DML JSON files (automated) by @github-actions[bot] in #13855
- chore(docs): Updated UI Reference (automated) by @github-actions[bot] in #13856
- chore(docs): Generated References (automated) by @github-actions[bot] in #13857
- chore: fixes to http and request types for products by @shahednasser in #13833
- chore: fixes to HTTP and request types for API Keys by @shahednasser in #13819
- chore: fixes to HTTP and request types for promotions by @shahednasser in #13820
- chore: fixes to HTTP and request types for carts by @shahednasser in #13821
- chore: fixes to http and request types for orders (2) by @shahednasser in #13823
- chore: fixes to http and request types for orders (3) by @shahednasser in #13824
- chore: fixes to http and request types for customers by @shahednasser in #13825
- chore: fixes to http and request types for fulfillment by @shahednasser in #13826
- chore: fixes to http and request types for inventory by @shahednasser in #13827
- chore: fixes to http and request types for users by @shahednasser in #13828
- chore: fixes to http and request types for payments by @shahednasser in #13830
- chore: fixes to http and request types for payment and regions by @shahednasser in #13831
- chore: fixes to http and request types for sales channes, taxes, and store by @shahednasser in #13832
- chore: fixes to http and request types for orders (1) by @shahednasser in #13822
- chore: Inject sandbox handle in cloud config by @olivermrbl in #13879
- chore(types,notification): Make template nullable on emails by @olivermrbl in #13889
Other Changes
- add Medusa Cloud Email provider by @peterlgh7 in #13781
- feat(dashboard): add input field for tracking_url and label_url in shipment form by @kevinresol in #13787
- fix(dashboard): Resolve issue with product attributes input by @siddarthan007 in #13863
- fix(dashboard): tax region override too large payload by @NicolasGorga in #13860
- fix(admin): fix admin promotion list sort by @bqst in #13872
- feat(admin): change admin order list default sort by @bqst in #13874
- fix(dashboard) Standardize heading levels for consistent hierarchy by @radeknapora in #13861
- feat(dashboard): type-safe i18n for UI extensions by @leobenzol in #13851
New Contributors
- @MBLVD made their first contribution in #13862
- @kevinresol made their first contribution in #13787
- @siddarthan007 made their first contribution in #13863
- @cboeddek made their first contribution in #13866
Full Changelog: v2.11.1...v2.11.2