Forums / General Questions / Product Images -- too many in one folder

Product Images -- too many in one folder

Views: 1,338

Results 1 to 10 of 10
30 May 2013, 11:30 PM
#1
karimah avatar

karimah

New Zenner

Join Date:
Jul 2010
Location:
Memphis, Tn
Posts:
19
Plugin Contributions:
0

Product Images -- too many in one folder

Hi everyone, :D

I have a big issue that I need to get resolved ASAP. Any assistance will be greatly appreciated. I have been with Godaddy hosting for at least 10 years and have not had any major issues.

There was an issue with my online store. I had to delete everything and start all over from scratch. I have approximately 8,750 product images on the website. I called Godaddy the other day because I was unable to log into my file manager via Godaddy.com. I was then advised that I had violated their terms of service by having more that 1,024 images. I was very much surprised.

Nevertheless, I have to find a way to have my images separated by directory as to not have more than 1,024 in any folder. I have Googled and have not been able to find step by step on how to do this. I don't know what I'm doing so I would need step by step so that I don't mess up anything.

I have Godaddy's unlimited hosting plan and all my websites (20) are under that plan and I would have to have to move them to another host who would probably be a bit more expensive than Godaddy. Who would have thought that the "unlimited" hosting plan would be limited to 1,024 images.

If anyone can advise me on how to do this, please do. I certainly appreciate it. Thanks in advance. :smile:

Here's my website https://www.wholisticbynature.org

30 May 2013, 11:46 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Product Images -- too many in one folder

You would have to move your images to folders
Then you need to point to each of them in
admin > catalog > products > edit > each product updating where the image for it is

Zen-Venom Get Bitten

31 May 2013, 12:58 AM
#3
karimah avatar

karimah

New Zenner

Join Date:
Jul 2010
Location:
Memphis, Tn
Posts:
19
Plugin Contributions:
0

Re: Product Images -- too many in one folder

Thank you for your response. That helps a great deal. I have another question, is there a quick way to doing this or would I have to do 1 by 1? I don't even want to fathom that thought with over 8000+ numerically named images. lol

31 May 2013, 6:40 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Product Images -- too many in one folder

Sorry but there is no way to accomplish this programatically

Only suggestion would be to find another host

Zen-Venom Get Bitten

31 May 2013, 8:49 AM
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Product Images -- too many in one folder

It can be done faster using EasyPopulate - but is still a manual exercise - though using spreadsheet tools can make the process much faster.

We did 33,000 product image paths using EasyPopulate (in over 200 sub-folders) on THIS SITE

A simpler (and perhaps far better) solution is to move the site to a decent host. Nobody who is serious about ecommerce hosts with GoDaddy. They are 100% hopeless in this area (and most others too).

20 years a Zencart User

1 Jun 2013, 4:05 AM
#6
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Product Images -- too many in one folder

I have done a similar thing in the past.
First off you need to create the subfolders in your images folder

i named my folders a, b ,c ,d etc

Now you can write a script that will move all images whose name starts with 'a' to folder 'a' etc, i personally just dragged and dropped, which took for ever
Once thats done your site images won't show up because the image locatos in your database are now invalid.

There are 2 ways to do the next bit
You'll need to run an sql script will update the images location in the product (or product desc) table which is easy to do
something like
In this case we are updating the locations for the images starting with s

UPDATE PRODUCTS SET products_image = CONCAT( 's/', products_image ) WHERE products_image LIKE 's%' OR products_image LIKE 'S%'

This will correct the link in the database, you just need to run it 26 times replacing the Bolded s with other letters and make sure the final letter is uppercase

Ps always test on a backup site, especially when using sql etc (especially if the sql is from me)

Webzings Design
Semi retired from Web Design

1 Jun 2013, 5:05 AM
#7
karimah avatar

karimah

New Zenner

Join Date:
Jul 2010
Location:
Memphis, Tn
Posts:
19
Plugin Contributions:
0

Re: Product Images -- too many in one folder

Hi, Schoolboy

Thanks for your reply. I use Apsona, which does pretty much the same as EasyPopulate. But my issue is more of getting folders created to eliminate having more than 1024 files in one folder and being able to get that set up without doing one by one. Will EasyPopulate help with that?

With Apsona, I upload a spreadsheet with all the product info. That takes care of all the product listing...and I have a folder that has over 8,000 images. As it stands right now, I have all the images in the image folder. That is the challenge. Getting the images placed into different folders without having to do this one by one and not messing up anything, which I have been known to do. lol. :D

I may have to look at another host as Kobra mentioned.

1 Jun 2013, 5:05 AM
#8
karimah avatar

karimah

New Zenner

Join Date:
Jul 2010
Location:
Memphis, Tn
Posts:
19
Plugin Contributions:
0

Re: Product Images -- too many in one folder

Thank you Kobra, I hated to hear that, but truth is. Gotta get it done. :D

1 Jun 2013, 5:09 AM
#9
karimah avatar

karimah

New Zenner

Join Date:
Jul 2010
Location:
Memphis, Tn
Posts:
19
Plugin Contributions:
0

Re: Product Images -- too many in one folder

Thanks for your help Nigelt74. Whoa, this is deep for a newbie. :D Thanks for making it step by step. Do you think this will work with numerically numbered images?

1 Jun 2013, 7:59 AM
#10
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Product Images -- too many in one folder

There is no reason it shouldn't work.

you would just remove the final condition as you don't have uppercase numbers

UPDATE PRODUCTS SET products_image = CONCAT( '8/', products_image ) WHERE products_image LIKE '8%'

Webzings Design
Semi retired from Web Design