Forums / Install & configuration / GD requiered for upload ?

GD requiered for upload ?

Author Message

Vincent Basset

Wednesday 21 January 2004 6:38:24 am

Hi,

My template doesn't display the images I uploaded (in articles)

The HTML source code which is generated is :

<img src="/ez331" width="" height="" border="0" alt="" title="" />

I have neither GD nor ImageMagik installed, but I thought they were needed to create image with scripts, not to upload or display images ???
Am I wrong ?
Is it the source of my problem ????

++++++++++++

Here is my template for displaying the image of an info page while viewinf its parent directory : (class id 10 is an info page)

{let children_pays=fetch('content', 'list', hash(parent_node_id, $node.node_id, class_filter_type, "include", class_filter_array, array(10)) ) }
{section name=Child loop=$children_pays}
{attribute_view_gui attribute=$Child:item.object.data_map.image}
{/section}
{/let}

THX :)

Marco Zinn

Wednesday 21 January 2004 1:00:34 pm

No, your image is probably uploaded fine.
What happens: the template uses some predefined default size ("small" or so) to display the image, when you use the attribute_view_gui .
This required the image to be scaled and THIS scaling needs some image processing (ImageMagick or GD).
If you don't have any of those two, you can only display the image in "original" size.
You can try
{attribute_view_gui attribute=$Child:item.object.data_map.image size=original}
but I don't know, if this works.

You should have a look at the "embed"-templates, there must be one for images. This is used, when you embed an image(image object) in an XML field.
Or look for the "view attribute" template of the image datatype. Probably somewhere in design/standard/datatypes/view/image or the like.
Hope, that helps.

Marco
http://www.hyperroad-design.com

Vincent Basset

Thursday 22 January 2004 6:33:12 am

Hi Marco,

{attribute_view_gui attribute=$Child:item.object.data_map.image size=original}

=> it doesn't works... :(

Or look for the "view attribute" template of the image datatype. Probably somewhere in design/standard/datatypes/view/image or the like.

=> do you mean design/standard/templates/content/datatype/view/ezimage.tpl ?
If yes, what am I supposed to change here ??? :/

Lazaro Ferreira

Friday 23 January 2004 11:11:18 am

Hi,

I'm not sure but take a look at your Settings in your image.ini or image.ini.append

if you don't have neither ImageMag.. nor Gd installed, probably you will need to change the settings value to match your setup

We have a similar problem, but in our case EZP was trying to use Imagemag.. for conversion, so we have to change the settings to :

[ConverterSettings]
UseConvert=false
UseGD=true

[Rules]
DefaultRule=image/jpeg;gd
Rules[]=image/jpeg;image/jpeg;gd
Rules[]=image/png;image/png;gd
Rules[]=image/gif;image/png;gd
Rules[]=image/xpm;image/png;gd
Rules[]=image/tiff;image/png;gd

-----------------------------------------------
The Rules settings have the mime type of the images accepted by EZP and the conversion method
could be 'convert', or 'gd' (convert for imagemagick)

This is a setup, which do not have Imagemagick instead GD

I think that your setup should be something like this :

[ConverterSettings]
UseConvert=false
UseGD=false

[Rules]
DefaultRule=image/jpeg
Rules[]=image/jpeg;image/jpeg
Rules[]=image/png;image/png
Rules[]=image/gif;image/png
Rules[]=image/xpm;image/png
Rules[]=image/tiff;image/png

-----------------------------------------
The ConverterSettings changes, seems trivial!
The Rules changes, may or may not work, but you could try it

Hope this help
Lazaro

Lazaro
http://www.mzbusiness.com