Skip to content

[Bug]: thumbnail image not saved when adding a new product from admin panel #13172

@praveen-ak

Description

@praveen-ak

Package.json file

Not Needed,

Node.js version

v20

Database and its version

PostgreSQL 15

Operating system name and version

Ubuntu 24

Browser name

Chrome

What happended?

When adding a new product from the admin panel, I uploaded four images and selected one of them as the thumbnail. After saving, the product detail page does not display the selected thumbnail.

Upon checking the database, only three image records are stored — the thumbnail image is missing.

However, if I perform the same flow via the Edit Product page (editing an existing product), the thumbnail image is saved correctly in the images table and appears on the detail page.

Steps to Reproduce:

Go to the admin panel → Add Product.
Upload four images.
Select one image as the thumbnail.
Save the product.
Check the product detail page and the images table in the database.

Expected behavior

The selected thumbnail image should be saved to the database and displayed on the product detail page.

Actual behavior

The thumbnail image is missing from the database when adding a product, but works fine when editing a product.

Link to reproduction repo

medusa

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions