Support » Plugins » [Plugin: NextGEN Gallery] No image resize

  • Resolved Sumit1988


    Hi guys

    I use NGG a long time now. THe following problem exists everytime for me.
    NGG is not resizing images! I want them to 800×600 but they are still 3xxx x 2xxx Pixel. So the img-loading is very slow.

    In older versions i solved the problem with this:

    Editing the /wp-content/plugins/nextgen-gallery/admin/wp25/functions.php
    Search for the function upload_images()
    Scroll down after the end of the loop and check for this code:
    //create thumbnails
    nggAdmin::generatethumbnail(WINABSPATH.$gallerypat h,$imageslist);
    BEFORE THAT add this:
    //create resized pictures
    nggAdmin::resizeImages(WINABSPATH.$gallerypath,$im ageslist);

    It worked. But in the new version of NGG there is no Folder named wp25.
    So how can i get the resize function to work?

    Betriebssystem : Linux
    Server : Apache/2.2.3 (Red Hat)
    Speicherverbrauch : 23 MByte
    MySQL Version : 5.0.45
    SQL Modus : Nicht gesetzt
    PHP Version : 5.2.6
    PHP Safe Mode : Aus
    PHP Allow URL fopen : An
    PHP Memory Limit : 64M
    PHP Max Upload Größe : 24M
    PHP Max Post Größe : 24M
    PHP Max Script Execute Time : 30s
    PHP Exif Modul : Ja ( V1.4 )
    PHP IPTC Modul : Ja
    PHP XML Modul : Ja

    Ja=Yes, An=On, Aus=Off

    Sorry for my bad english!



Viewing 8 replies - 1 through 8 (of 8 total)
  • ok why the hell did not anyone told me, that i ONLY can resize the images AFTER the upload? 😀
    cmon i wasted 24 hours with google searching :-/

    Then idea: Image resize on upload would be cool!

    Yes, but not possible… (With PHP, only with JAVA or OS based tools)

    Well you can do something ugly and dangerouse like adding
    as the first line of the function create_thumbnail($image) in the funtions.php file

    I’m a little confused by this too. In the NGG options:images there is an image resize option. I assumed this meant the script would resize the uploaded images to that size on occasions when I uploaded larger size images. I usually resize myself before upload, so didn’t know if this worked. Now I have other authors that want to upload images too. Not all are able (or think about) resizing first. I’ve discovered that setting image resize to 800×800 doesn’t seem to resize the images after all. Is this option just not functional? Or does it only increase smaller images to the set size? Or have I missed something else I need to set to make this happen? Can anyone explain?


    @ michaelstx

    as i postet above: i got the same problem and didnt get, where the hell this resize-option is useable. But i got it now and you and your customers can use it without a new program oder anything.

    Just check this:
    Upload your images in any size. Which can be 50.000 x 6000PX or whatever. Now do your gallery stuff. Then go to “edit/manage gallery” and edit the new gallery. Just select ALL images in this gallery and select the action: “resize images” or something like that. Then the OK button and it will resize your images.

    This resize option is for resizing images after the upload. Understood?
    Have fun!

    thanks for this tips! I’ve been also wondering why the hell NGG is not resizing the images on upload. The way this option is stated it suggests that images would resized on the moment of upload

    For those interested, I have a code change that will make your images resize during the upload process to the sizes you specify in settings. Here’s what to do:

    1) Open ~/wp-content/plugins/nextgen-gallery/admin/functions.php in your favorite text/code editor.

    2) Search for “// now create thumbnails” should be line 192.

    3) Insert just above the following code:

    // now create resized images
    foreach($image_ids as $r) {
    	nggAdmin::resize_image ( $r, 0, 0 );

    4) Save.



    @alexrabe: Are you serious? Your plugin is awesome, but that doesn’t make any sense.

    @adamch25: Thank you. That worked for me perfectly. I will post again if there’s any problems.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: NextGEN Gallery] No image resize’ is closed to new replies.