Forums / Setup & design / Image size problem

Image size problem

Author Message

Mohammad Tufail

Thursday 27 March 2008 7:24:14 am

I am uploading picture having original size 46 X 113 pixel but when it is uploaded to Media Directory the size of the picture get increased i.e 100 X 300 Pixel.

Any Solution for this?

Greg McAvoy-Jensen

Thursday 27 March 2008 8:12:14 am

Mohammad,

It's not a bug, it's a feature!

When you upload an image, eZ Publish keeps a copy in the original size. But it will also make copies of it in other sizes you need. See the settings/image.ini file (overridden in settings/override/image.ini.append.php). When you call an image, you specify which of those sizes you want (original, small, etc.). This is done in the template code or, if it's an object in a XML block, in the properties.

Here's a helpful (if old) introduction to the image system: http://ez.no/download/ez_publish/changelogs/ez_publish_3_3/new_image_system

The comments in settings/image.ini are also helpful.

If you need an image size not provided by default, best practice seems to be to add a new one rather than adjust an existing size.

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog