Forums / General Questions / Maximum number of characters in an image filename??

Maximum number of characters in an image filename??

Started by kcb410 on 1 Aug 2013, 4:47 PM · Views: 1,588

Results 1 to 5 of 5
1 Aug 2013, 4:47 PM
#1
kcb410 avatar

kcb410

Zen Follower

Join Date:
Dec 2008
Location:
Toronto
Posts:
348
Plugin Contributions:
0

Maximum number of characters in an image filename??

Hello Everyone,

Does Zen Cart have a maximum number of characters allowed in a product image file name??

We're having some issues replacing product images and the only noticeable difference is the length of the filename.

Any help is appreciated.
Thanks.

1 Aug 2013, 4:56 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Maximum number of characters in an image filename??

kcb410:

Hello Everyone,

Does Zen Cart have a maximum number of characters allowed in a product image file name??

We're having some issues replacing product images and the only noticeable difference is the length of the filename.

Any help is appreciated.
Thanks.

Yes... the field is limited to (I think) 32 characters in the database.

You can increase this by editing the VARCHAR field for images in the products table, via PHPMYADMIN.

I usually increase mine to 64 characters. You don't want it too big... 64 characters is usually enough.

As with all edits to a database - BACKUP first.

20 years a Zencart User

1 Aug 2013, 4:58 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Maximum number of characters in an image filename??

BUT if you're trying to increase it so you can replace the filenames with URLs then be aware that it's not designed to use URLs for image filenames. It's expecting files on your server, not someone else's.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Aug 2013, 5:15 PM
#4
kcb410 avatar

kcb410

Zen Follower

Join Date:
Dec 2008
Location:
Toronto
Posts:
348
Plugin Contributions:
0

Re: Maximum number of characters in an image filename??

Thanks Schoolboy & Dr Byte.

We're just uploading new product images with descriptive file names like... product-id-model-number-actual-product-description.jpg

1 Aug 2013, 5:18 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Maximum number of characters in an image filename??

Good idea ;)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.