ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Gallery thumbnail resizing issue

April 01, 2011 12:16pm

Subscribe [4]
  • #1 / Apr 01, 2011 12:16pm

    cfenwick

    53 posts

    I’ve recently moved an EE1.7 site from one server to another, and all seems to be well.

    The only issue is that now when I upload an image to the image gallery, the thumbnail is resized to the specified height only (140px) and it completely ignores the width I’ve specified in my gallery preferences (also 140px).

    I’ve double checked all my prefences but to no avail. Any ideas why this might be happening?

  • #2 / Apr 02, 2011 2:08pm

    Greg Salt

    3988 posts

    Hi cfenwick,

    Have you checked and/or changed the Image Resizing preferences at Admin > System Preferences > Image Resizing Preferences? Please also run the Server Wizard to make sure that your chosen image manipulation protocol is available on your new server.

    Cheers

    Greg

  • #3 / Apr 04, 2011 5:52am

    cfenwick

    53 posts

    Thanks Greg,

    The Image Resizing Preferences in Admin are set to GD2, and the Thumbnail Resizing Preferences in my gallery preferences are set to 140 x 140 pixels (constrain proportions is also ticked).

    I ran the Server Wizard and it appears GD2 is supported (please see attached grab).

  • #4 / Apr 06, 2011 4:20am

    John Henry Donovan

    12339 posts

    cfenwick,

    The only issue is that now when I upload an image to the image gallery, the thumbnail is resized to the specified height only (140px) and it completely ignores the width I’ve specified in my gallery preferences (also 140px).

    Do you mean it is constrained by the height only?
    Or if you upload an image say 1024px by 768px then the thumbnail is generated at 1024px x 140px?

    If it is just your aspect ratio then open up system/core/core.image_lib.php LINE 29
    Change the following line

    var $master_dim = 'height';

    to

    var $master_dim = 'width';
  • #5 / Apr 06, 2011 5:49am

    cfenwick

    53 posts

    Hi John,

    When I upload an image that is 1024px by 768px I would like the image to resize to fit within a square of 140px (so image should resize to 140px wide by 105px high) and this is the way it WAS working before I moved the site.

    But at the moment when I upload an image that is 1024px by 768px it is resizing to 187px wide by 140px high. So it only seems to be paying attention to the height, even though I have specified both width and height to be 140px????

  • #6 / Apr 06, 2011 2:26pm

    Sue Crocker

    26054 posts

    Did you check to see what the value is in the file John linked to?

  • #7 / Apr 07, 2011 6:44am

    cfenwick

    53 posts

    Sorry folks, it’s currently set to…

    var $master_dim = 'height';
  • #8 / Apr 07, 2011 7:03am

    cfenwick

    53 posts

    Aha, I just checked the same file on the old site and it’s set to…

    var $master_dim = 'auto';

    ...could this be the reason?

  • #9 / Apr 07, 2011 8:26am

    Sue Crocker

    26054 posts

    Give that value a try. As well as width. But it sounds like auto will work for you..

  • #10 / Apr 07, 2011 11:00am

    cfenwick

    53 posts

    Bingo!! That worked a treat!! Thank you both very much for your help 😊

  • #11 / Apr 07, 2011 1:34pm

    Lisa Wess

    20502 posts

    Hey cfenwick - glad to see that Sue and John Henry were able to help you out.  If anything else comes up, please start a new thread.  Thank you!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases