[opencms-dev] Trouble with "cms:img" Tag

Jan.Hoffmann at sdm.de Jan.Hoffmann at sdm.de
Tue Aug 8 16:13:05 CEST 2006


Hi all,

I'm trying to scale down images but something seems to be wrong: using the following code, I get no output (as in *nothing*) in the rendered html document:

<cms:img src="../resources/images/sys/DE/something.gif" width="400" height="400"></cms:img>

Same if I do the following:

<cms:img src="../resources/images/sys/DE/something.gif" width="400" height="400"/>

Scaling itself seems to work, as I can scale images by appending "?__scale=w:400,h:100". 

Looking at the sources or the javadocs doesn't help me much. I'm running OpenCms version 6.2.1. 

One more related question: it seems like scaling will generate borders (stripes) at the top and bottom (or left/right) if the size given by width and height does not match the original aspect ratio. Is there a way to, say, scale down the image to a specific width but maintaining its aspect ratio?

Cheers, Jan

--
Jan Hoffmann
mailto:jan.hoffmann at sdm.de 
Niederlassung Berlin 
sd&m AG http://www.sdm.de 
software design & management 
Kurfürstendamm 22, Neues Kranzler Eck 
10719 Berlin, Germany 
Tel +49 30 887250-400 Fax -199 



More information about the opencms-dev mailing list