[opencms-dev] image.jpg?__scale limits?
Michael Emmerich
m.emmerich at alkacon.com
Fri Sep 17 16:57:34 CEST 2010
Hello Yves,
Am 17.09.2010 16:39, schrieb Yves Glodt:
> Hi there,
>
> I (ab)use __scale on an image to have it generated according to the
> size of an element (div), like this:
>
> /images/bg.jpg?__scale=w:1500,h:715,t:2,q:70,c:FFFFFF
>
> Strangely, it looks like there is a limit in the __scale function,
> since, when I have a width> 1500, it does not scale at all but simply
> returns the image full-size.
> As long as I remain< 1500, the scaling works as expected.
>
> Can this limit be changed?
There is indeed a default max size for image scaling, which is 1500 for
either width or heigth.
To change this, you have to change the configuration of the image loader
in the opencms-vfs.xml.
Replace the
<loader class="org.opencms.loader.CmsImageLoader">
<param name="image.scaling.enabled">true</param>
</loader>
with
<loader class="org.opencms.loader.CmsImageLoader">
<param name="image.scaling.enabled">true</param>
<param name="image.scaling.maxsize">2500</param>
</loader>
This would set the max size to 2500.
Do not forget to restart your OpenCms after you made the changes to the
configuration.
--
Kind Regards,
Michael.
-------------------
Michael Emmerich
Alkacon Software GmbH - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org
More information about the opencms-dev
mailing list