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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 04:31:55
Script start
Timing: Jan 19 2025 04:31:55
Module start 'layout'
Timing: Jan 19 2025 04:31:55
Module start 'content'
Timing: Jan 19 2025 04:31:56
Module end 'content'
Timing: Jan 19 2025 04:31:56
Script end

Main resources:

Total runtime1.1987 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 589.1484152.6250
Module start 'layout' 0.00460.0029 741.773439.4297
Module start 'content' 0.00751.1897 781.2031532.1094
Module end 'content' 1.19720.0014 1,313.31258.1875
Script end 1.1986  1,321.5000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2480160.0002
Check MTime0.00120.1039160.0001
Mysql Total
Database connection0.00070.054910.0007
Mysqli_queries1.146795.6646540.0212
Looping result0.00070.0569520.0000
Template Total1.166797.320.5833
Template load0.00210.175620.0011
Template processing1.164697.153320.5823
Template load and register function0.00020.015410.0002
states
state_id_array0.00080.063710.0008
state_identifier_array0.00090.075320.0005
Override
Cache load0.00170.1399140.0001
Sytem overhead
Fetch class attribute can translate value0.00190.156820.0009
Fetch class attribute name0.00200.170240.0005
XML
Image XML parsing0.00120.104020.0006
class_abstraction
Instantiating content class attribute0.00000.000740.0000
General
dbfile0.00270.2245240.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs