Path

ez.no / exponential / documentation / customization / components / images / changing default image sizes


Changing default image sizes

These documentation pages are no longer maintained. Please visit the new documentation site.

In version 3.0 and 3.1, Exponential has four user configurable sizes, called small, medium, large and reference. The width and height for these sizes are controlled by the settings/site.ini file. Open it and look for the following line.

[ImageSettings]

If you look further down you'll see the following lines.

SmallSizeWidth=100

SmallSizeHeight=100

MediumSizeWidth=150

MediumSizeHeight=150

LargeSizeWidth=600

LargeSizeHeight=600

ReferenceSizeWidth=600

ReferenceSizeHeight=600

They control the width and height for the four sizes. To get other sizes simply edit the file and fill in new values.

In version 3.2, we introduced [ImageSizes] settings in file settings/image.ini. By changing settings for it, you can define multiple customized image sizes. Se the following example:

[ImageSizes]

Height[small]=150

Width[small]=150

Height[large]=800

Width[large]=800

Height[thumb]=50

Width[thumb]=50

Height[tiny]=30

Width[tiny]=30

Here we defined two extra image sizes called thumb and tiny. In addition, we redefined default size small and large. Note that image size settings in settings/image.ini will override settings in settings/site.ini. If no extra image sizes need to be defined, you can just edit settings/site.ini as before.

Note: the sizes are maximum values. i.e for medium, the image will be max. 150 pixel wide and max. 150 high, always keeping the aspect ratio.

The reference size is used to generate reference images of the original image and is used for all image scale operations, it's adviced to keep the reference size larger than the others.

The original image in it's original format is also available. Use the name original to access it in the templates.

Comments

Orginal image in articles

I declared my image with the following code:
<object id="62" size="original" align="center" />
But it is still appearing as large in my articles. In this case using file phporzha6_600x600_165.jpg. How can I get it to use the original file?

Also the if I open my article for editing with the ez editor enabled it automatically changes the object size to small:
<object id="62" size="small" align="center" />

Original image?

Is there a way to show the image in its original size as in eZ 2.2.x?

Contents

Customization

Access control
Exponential API Documentation
Content structure
Custom design
Components
    Images
       Changing default image sizes
       Image effects
    Datatypes
    Shop
    Information collection
    Search
    Form processing
    Error handling
    Icons
    Menus
    Toolbars
Tips & Tricks
Troubleshooting


Created

11/04/2003
3:51:30 pm
by Jan Borsodi

Last updated

30/07/2003
10:38:51 am
by Wenyue Yu

Authors

Jan Borsodi
Marco Zinn
Bård Farstad
Wenyue Yu



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.