How to overwrite existing Product Images ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Hello,
I need update about 5000 product images.
(picture1 and picture2 only), Not (Picture3,4,5) for all those products.

The file i want to overwrite them with has the same file name but new image.

Is there anyway in NopCommerce to go about this ?
What is the best way to bulk update product images on NopCommerce.

Thanks,
Varun
4 years ago
Are your pictures in the database or file system?
4 years ago
New York wrote:
Are your pictures in the database or file system?


File system
Nopcommerce 4.10
4 years ago
You have to change those pictures manually. To find replaceable pictures in easier way, run below query.

SELECT j.PictureId, p.Name FROM (
    SELECT ProductId,PictureId, ROW_NUMBER()
    OVER (
        Partition BY ProductId ORDER BY DisplayOrder
    ) AS Rank FROM Product_Picture_Mapping
) j inner Join Product p on p.Id = j.ProductId
WHERE Rank <= 2

This query will show you the top 2 pictures' Id of each product. Select one by one, and replace picture files from ~/images directory.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.