Forums / Setting Up Categories, Products, Attributes / Changing the Image Directory

Changing the Image Directory

Results 1 to 4 of 4
27 Feb 2014, 02:28
#1
jcrennan avatar

jcrennan

New Zenner

Join Date:
Mar 2012
Posts:
12
Plugin Contributions:
0

Changing the Image Directory

I am after some assistance with changing my image folder.

I had the issue of one or multiple people constantly either a robot leaching my images or referencing my images for another site to the point where I was constantly running out of bandwidth for my site. To counteract the issue I have had to rename my image directory.

I have changed the image directory using FTP and set permissions to 777
I have modified my configure.php file define('DIR_WS_IMAGES', 'movedimages/')

The site and everything seems to work fine until I go into the catalogue menu in the admin and then I get
Error: Catalog images directory does not exist: /home/sitename/public_html/shop/images/

Can someone either suggest another process to stop the use of my images or suggest how I can fix the error?
27 Feb 2014, 02:36
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: Changing the Image Directory

First, try making the same name change in your admin /includes/configure.php - that will get it looking in the correct new place.

Your cPanel or whatever your server uses may have a "hotlinking protection" feature.
27 Feb 2014, 02:46
#3
jcrennan avatar

jcrennan

New Zenner

Join Date:
Mar 2012
Posts:
12
Plugin Contributions:
0

Re: Changing the Image Directory

gjh42:

First, try making the same name change in your admin /includes/configure.php - that will get it looking in the correct new place.

Your cPanel or whatever your server uses may have a "hotlinking protection" feature.


Thanks the first option worked I hadn't realised to change that file

For others

LEAVE this line define('DIR_WS_IMAGES', 'images/');

Change this line define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'movedimages/');
Change this line define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'movedimages/');

And this seemed to work for me
27 Feb 2014, 02:53
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: Changing the Image Directory

The changed images folder will work only until the leeches follow the path to the new one. You can't hide it, as it has to be publicly available. For actual protection you need to use the server security.