e2interactive forums » (E)2 Photo Gallery FAQ

Search:

Default size of images is too big.

(5 posts)
  • Started 4 months ago by knowdice
  • Latest reply from knowdice

  1. Where in the code can I set the default size of the images I upload? Currently, no matter what size my images are, E2 stretches them to a particular size.

    Posted 4 months ago #
  2. open the index.php file in the uploder folder and find the following lines of code:

    $handle->image_resize          = true;
    			$handle->image_ratio           = true;
    			$handle->image_y               = 600;
    			$handle->image_x               = 600;
    			$handle->jpeg_quality		   = 95;

    Change the $handle->image_y = 600; $handle->image_x = 600; to the size you'd like the max height and width to be.

    Posted 4 months ago #
  3. Brass
    Member

    I have changed this on my index.php, but how come the image still gets stretched ? If I upload a image that is 100px X 100px how come it get strechted at a resolution of example, 480x480 ? How come e2 can't keep it's original resolution without stretching ?

    Posted 4 months ago #
  4. Brass
    Member

    It's alright I got it solved.

    $handle->image_resize = true;
    /*$handle->image_ratio = true;
    $handle->image_y = 600;
    $handle->image_x = 600;
    $handle->jpeg_quality = 95;*/

    You have to add /* and */ as you see in this example and your images won't resize BUT if you have already uploaded images to the e2 gallery and there stretched you have to delete them and re-upload them after making this change.

    Posted 4 months ago #
  5. Thanks for the reply!

    Posted 3 months ago #

RSS feed for this topic

Reply

You must log in to post.