Title: [Plugin: NextGEN Gallery] API question &#8211; get image
Last modified: August 19, 2016

---

# [Plugin: NextGEN Gallery] API question – get image

 *  [navyseal](https://wordpress.org/support/users/navyseal/)
 * (@navyseal)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-api-question-get-image/)
 * hi!
    i am currently modding my gallery template and therefore i need each preview
   pic of a gallery in a certain size (cropped). so far i could find out the image
   id over the nggdb object (nggdb::find_image($gallery->previewpic)) but i cant
   display it…. is there a simple way to display the image?!
 * ps: sorry for my bad english 😉

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-api-question-get-image/#post-1153463)
 * see nggSinglePicture() in nggfunctions.php
 *  Thread Starter [navyseal](https://wordpress.org/support/users/navyseal/)
 * (@navyseal)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-api-question-get-image/#post-1153509)
 * ok this function works great, but is there a way to crop the resulting image 
   with your lib?
 *  Thread Starter [navyseal](https://wordpress.org/support/users/navyseal/)
 * (@navyseal)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-api-question-get-image/#post-1153688)
 * hi
    i found a way to generate the images with the specific size over the ngg_Thumbnail
   class – but i want to generate the images on the fly so i tried display the thumb
   with the show method …. <img class=”cover” alt=”<?php echo $gallery->title ?>”
   src=”<?php $thumb->show(70) ?>” />
 * instead of the image i only get some cryptic text output (�]����{�Q��}(a��l_r
   �@Q@ EPIKI@%���) :/ when i save the image into a file it works …
 * i hope someone could help me with that problem!
 *  [ojobson](https://wordpress.org/support/users/ojobson/)
 * (@ojobson)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-api-question-get-image/#post-1153699)
 * Have you found a solution to this problem? I am looking to have a preview pic
   for my galleries too – I thought if I inserted the image ID of the preview image
   into custom fields on the post, then I could insert a string into the loop to
   echo the html to display the image next to the title
 * Now I have a list of post titles, but no idea how to use nggsinglepicture() and
   the custom fields call to display the picture!
 * Any help would be welcome.
 *  [cruisetastic](https://wordpress.org/support/users/cruisetastic/)
 * (@cruisetastic)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-api-question-get-image/#post-1153703)
 * I too am looking for the same thing – a preview of the gallery (not album) that
   I can use for a thumbnail.
 * HELP!
 *  [ojobson](https://wordpress.org/support/users/ojobson/)
 * (@ojobson)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-api-question-get-image/#post-1153706)
 * I found [this post](http://wordpress.org/support/topic/238369?replies=3) which
   could be helpfull…
 * ..but I have no idea what to do with the code – any ideas where I put it and 
   how I call it? This has got me stumped…

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘[Plugin: NextGEN Gallery] API question – get image’ is closed to new 
replies.

 * 6 replies
 * 4 participants
 * Last reply from: [ojobson](https://wordpress.org/support/users/ojobson/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-api-question-get-image/#post-1153706)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
