Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Reusing images
 
Chris Farley
Member
 
Total Posts:  43
Joined:  2008-03-09
 

I’ve got a lot of very similar products. To improve performance and page load times, I would love to be able to reuse the same image for multiple products. If I upload the same image file, Magento renames it (e.g., widget.jpg, widget_1.jpg, widget_2.jpg, etc.). I’m going to have to upload hundreds of image files, where I only really need to have one.

Is there a way to hack the database so that I can share the same image file among many products? It would be awesome if you could specify a default image file by category; that would also solve the ‘problem’.

 
Magento Community Magento Community
Magento Community
Magento Community
 
flowstack
Sr. Member
 
Avatar
Total Posts:  159
Joined:  2008-01-30
London, United Kingdom
 

I wondering if you can do an export of all your products, enter the image path manually, then re-import.

Might be worth a shot.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alkarim
Guru
 
Total Posts:  368
Joined:  2008-04-10
 

hi flowstack, sorry, I just don’t get what do you mean ..

do you mean we input image at source code ??

 
Magento Community Magento Community
Magento Community
Magento Community
 
flowstack
Sr. Member
 
Avatar
Total Posts:  159
Joined:  2008-01-30
London, United Kingdom
 

No no. Hope this is clearer.

1. Export all your products as a CSV file. This is an option in the admin.
2. In the image column, enter the path to the image. e.g. /w/widget.jpg.
3. Re-import the CSV file. Hopefully all the products will now use the same image.

By the way this is untested. It’s just a hunch.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alkarim
Guru
 
Total Posts:  368
Joined:  2008-04-10
 

geez, i couldn’t find the export all the products at admin,

where can I find it ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
flowstack
Sr. Member
 
Avatar
Total Posts:  159
Joined:  2008-01-30
London, United Kingdom
 

System > Import/Export > Profiles

 
Magento Community Magento Community
Magento Community
Magento Community
 
alkarim
Guru
 
Total Posts:  368
Joined:  2008-04-10
 

one more question Mr Flowstack, you mean by in the image column is at ‘Profile Actions XML’ tab we insert XML code ? and input the path image that we want to add for many times ... ? and then use ‘Run Profile’ tab to make .csv ??

oh, I’m using magento v.1.0

 
Magento Community Magento Community
Magento Community
Magento Community
 
flowstack
Sr. Member
 
Avatar
Total Posts:  159
Joined:  2008-01-30
London, United Kingdom
 

Nope smile

Choose the ‘Export All Products’ profile and run it without changing the default settings.
Then look in /var/export for the csv file.
Open that file in something like Excel. You will see several columns (e.g. name, descriptions, etc.). There will be one for images. Enter the correct image path here.
Then save the Excel file and reimport it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alkarim
Guru
 
Total Posts:  368
Joined:  2008-04-10
 

thanx Flowstack…

by the way, how can I know that the image is being rename by Magento if we use the same image file ?? where should I go for it ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
flowstack
Sr. Member
 
Avatar
Total Posts:  159
Joined:  2008-01-30
London, United Kingdom
 

Add the image to one product in the normal way (in the admin). When you export the csv file, look up this product’s row and see what the image has been called and where it is.

Then just copy this into all the other cells.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alkarim
Guru
 
Total Posts:  368
Joined:  2008-04-10
 

haha, I’ve try this out and the image product has been changed.

there are several things I wondering ?
1. Magento still do not use only 1 file image, means Magento still using different file image from load same image..
2. if we do export and import it - nothing change, just get the file import.csv and export.csv

Hm,,,

 
Magento Community Magento Community
Magento Community
Magento Community
 
flowstack
Sr. Member
 
Avatar
Total Posts:  159
Joined:  2008-01-30
London, United Kingdom
 

Sorry. I didn’t understand any of that!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top