This question about Configuration: Answered

How to change default image path location

-- PatrickPirtle - 01 Jun 2012

My Foswiki site is running under Suse. This machine can see our office network, and the following HTML code displays images from our server without any problem:

<img src="\\forbin\CADmgt\MKACADD_Hybrid\CADWiki\Graphics\AutoCADSeedDialog.jpg" alt="" />

However, when I try to use this code:
%IMAGE{"\\forbin\CADmgt\MKACADD_Hybrid\CADWiki\Graphics\AutoCADSeedDialog.jpg" type="frame" align="center" caption="Seeds" }%

it gets replaced with the following error:

Error: (3) can't find \\forbin\CADmgt\MKACADD_Hybrid\CADWiki\Graphics\AutoCADSeedDialog.jpg in Sandbox

If I place an image in the "/var/www/Foswiki/pub/Sandbox/ImagePluginTest" folder, the following code displays it just fine:
%IMAGE{"AutoCADSeedDialog.jpg|alt text"}%

How do I tell the plugin to locate its images on our network server? Thanks, in advance, for your help


Patrick,

When you write a HTML tag, <img src=", you are instructing the Web Browser Client to read the image from that src. location. Foswiki does not have any access to that image.When you write a %<nop>IMAGE{ tag, you are asking Foswiki to process the image on the server. It's two completely different paths to the image. The \\forbin\CAD... syntax is a windows protocol for referencing files on a windows network share. It's called UNC or the Microsoft Windows Universal Naming Convention. Foswiki doesn't have any support for server side access to UNC filenames. Your PC however is probably running Windows and knows how to access UNC files. So the <img src=" instruction to your browser works.

You asked the same question in Question1101.

-- GeorgeClark - 08 Jun 2012

George -

Thanks for your reply. Actually, the questions are quite different. I can see that the answer I received to Question 1101 indicates that the question itself was misunderstood, so I'll go back and clarify it there. For THIS question, I now understand. The <img src=" tag works solely because when MY computer displays the wiki page, MY computer knows how to locate the image by retrieving it from the UNC.

So, to use the ImagePlugin, I'd HAVE to move (or copy) the images from our network to the Suse machine. If I do this, can I organize the images into folders and have the %<nop>IMAGE { tag use the path to the various folders?

Thanks, again, for all your help.

-- PatrickPirtle - 08 Jun 2012

You can attach the files to a topic, and then reference them using the %ATTACHURL or %PUBURL macros (ATTACHURL for the current topic, PUBURL for a different web/topic. See VarATTACHURL and VarPUBURL. Basically the Web/Topic serves as a folder structure.

If they are reachable using a "http://" url, then the ImagePlugin can be configured to locally cache them on the server. However if your topics also reference attachments external to your network, that can introduce untrusted files onto your server, and/or expose you to possible copyright violations. So I wouldn't recommend it. (I believe it's the default configuration however).

-- GeorgeClark - 08 Jun 2012

 

QuestionForm edit

Subject Configuration
Extension ImagePlugin
Version Foswiki 1.1.2
Status Answered
Related Topics
Topic revision: r4 - 08 Jun 2012, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy