Forums / Setup & design / Multiple Image Issues

Multiple Image Issues

Author Message

Russell Michell

Thursday 04 September 2008 4:42:24 pm

Hi folks,

ez 4.0.1rc2
PHP 5.2.5
Linux

Can anyone tell me why I might have 2 different locations for image storage? Have I stuffed something up?

* ezpublish/var/ezwebin_site/storage/images
* ezpublish/var/ezwebin_site/storage/images/media/images

Images uploded via WebDAV or the GUI seem to be placed in the latter now. What's the deal with the two locations? I guess I'd have thought the latter would only exist, not the former?

Also, I'm not sure this is a bug but in my siteaccess/my_site/image.ini.append.php file I have set all the entries using "NamePattern=<original_filename>" for example:

[image_ClassSettings]
FileAttribute=image
NameAttribute=name
NamePattern=<original_filename>

But when uploading 'my_image.jpg' for example via WebDAV or via the GUI, the image is named 'my_image.jpg.jpg' and if I upload it again, another copy is created in a new directory in var/ezwebin_site/storage/images/media/images/ called 'my_image.jpg2.jpg'. This is not what I'd expect, I'd expect the following to happen:

1). for a single folder to be called: 'my_image' with all the different sizes underneath.
2). newly uploaded versions of the same image - 'my_image' for example ('Same' = identical filename and mime-type), would simply replace all those existing versions under the directory 'my_image' and not a whole new folder created called 'my_image2'.

Does this not have the potential to make for a horrid mass of directories if there were any more than a few versions of say 100 stock images, not to mention an unecessarily bloated filesystem?

Is there some config option I have missed that can simplify my folder structure and/or ensure only one of the two directories under 'var' are only used from now on?

Sorry for all the questions, I hope someone can shed some light on my situation! :-)

Thanks a lot :-)
Russ

Russell Michell, Wellington, New Zealand.
We're building! http://www.theruss.com/blog/
I'm on Twitter: http://twitter.com/therussdotcom

Believe nothing, consider everything.

Mike Coker

Wednesday 17 September 2008 5:01:12 am

Hi, I've asked Andrew to have a look at this for you, I expect he'll get back to you shortly.

Mike Coker, BFA (Hons.)
Senior Designer & Strategist | Director

Quiqcorp Ltd | Web and Brand Development | Quiqcorp.com

Andrew Duck

Wednesday 17 September 2008 11:45:08 am

Hi Russ,

I can always rely on Mike to throw me into the fun things.

A most interesting question indeed. The first correction of course is that your NamePattern and related configuration options should be in the webdav.ini.append.php file as opposed to image.ini.append.php as you stated, but I am assuming that its just a typo in your forum post for the moment.

The images stored within var/ezwebin_site/storage/images are the actual node paths to the objects stored.

The images within storage/images/media/images are the images that are stored within the Media Library images folder. On browsing into this folder you would then find the names of each published image node, inside this should be one or more folders with an interesting naming convention:

object attribute id-version-language code (eg. 7653-2-eng-AU. this would reference an attribute id of 7653, with version 2 files for that object, within the english au language). Inside this folder you should find copies of your images with any modified images made by the aliases defined in image.ini

You have a single folder called my_image with its different sizes underneath, but it is housed within the same node structure as it is in the admin site.

I am unsure how the addition of WebDAV affects the file naming, I know there have been reported issues in the past, but it is not a feature I have played with extensively enough to give you a definitive answer without further testing :)

Perhaps someone else can provide some insight?

The images you are uploading should not have double extensions on the end, that is most certainly an issue that needs to be resolved. Could you provide excepts from your webdav.ini in your siteaccess that differ from the shipped defaults?

Regards,
Andrew.

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck