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

eZ debug

Timing: Jan 18 2025 02:05:07
Script start
Timing: Jan 18 2025 02:05:07
Module start 'content'
Timing: Jan 18 2025 02:05:08
Module end 'content'
Timing: Jan 18 2025 02:05:08
Script end

Main resources:

Total runtime0.7598 sec
Peak memory usage4,096.0000 KB
Database Queries196

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 587.7031180.8438
Module start 'content' 0.00690.6144 768.5469607.9688
Module end 'content' 0.62130.1385 1,376.5156336.7578
Script end 0.7598  1,713.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5330210.0002
Check MTime0.00150.2008210.0001
Mysql Total
Database connection0.00100.125410.0010
Mysqli_queries0.674188.72321960.0034
Looping result0.00200.26111940.0000
Template Total0.732296.420.3661
Template load0.00200.267420.0010
Template processing0.730196.088120.3651
Template load and register function0.00010.012110.0001
states
state_id_array0.00110.148010.0011
state_identifier_array0.00090.117520.0004
Override
Cache load0.00170.2234390.0000
Sytem overhead
Fetch class attribute can translate value0.00220.290540.0006
Fetch class attribute name0.00110.145660.0002
XML
Image XML parsing0.00210.272840.0005
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00981.2913420.0002
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs