NextGEN Gallery Review - Displaying Images - Singlepic
Table of contents for NextGEN Gallery Review
- NextGEN Gallery Review - Introduction
- NextGEN Gallery Review - Installation
- NextGEN Gallery Review - Configuration
- NextGEN Gallery Review - Image Management
- NextGEN Gallery Review - Displaying Images
- NextGEN Gallery Review - Displaying Images - Singlepic
- NextGEN Gallery Review - Displaying Images - Gallery
- NextGEN Gallery Review - Displaying Images - ImageBrowser
- NextGEN Gallery Review - Displaying Images - Album
To display a single image from any gallery, specify the singlepic shortcode on a post or page.
[singlepic=id,width,height,mode,float]
id= the ID of the image (e.g. 1).
width,height= width and height in pixels to scale the image to. These are maximums; the aspect ratio will be maintained.
mode(web20orwatermark) = options for displaying the image;web20displays the image with a mirror-like effect with a reflection;watermarkto add a watermark to the image. This parameter is optional.
float(right,center, orleft) = type of float CSS style to add to the image. This parameter is optional.
The singlepic shortcode displays a single picture from any gallery. Clicking on the image displays the image as you have specified on the Effects options page. With the default Thickbox effect, the background goes gray and a larger version of the image (if available) is displayed.
Examples
[singlepic=#,400,300]
Mode = web20
The web20 mode displays the image with a mirror-like effect with a reflection.
[singlepic=#,400,300,web20]
Mode = watermark
The watermark mode adds a text or image overlay on the image based on what you have specified on the Watermark options page.
[singlepic=#,400,300,watermark]
Float
The float parameter indicates how to place the image with respect to the rest of the content around it. It causes a float style to be added to the image HTML. Options include left, center, and right.
[singlepic=#,300,300,,right]
This text is displayed to the left of the image.
Wishlist / Caveats
- It would be nice if the width and height parameters were optional and the values were taken from the image in the gallery. This wouldn’t be as useful for large images, but for smaller inline images this would be very useful.
- It would be nice if the image could be displayed with no link so that a custom link could be specified instead. For example, I would like to be able to display an image and have it link to another web page or web site rather than bring up the “full size” image.
- It appears that the full-size image is downloaded to the visitor’s machine which is less than ideal. I’d prefer to have the option to download the thumbnail and scale that instead.
Resources
All images © 2008 Bethany Potter. All rights reserved.




August 5th, 2008 at 12:54 am
[...] NextGEN Gallery Review - Displaying Images - Singlepic [...]
August 13th, 2008 at 3:18 am
It would be nice if the float command had some padding to separate the image from the text, a bit like the HTML hspace and vspace commands
August 13th, 2008 at 3:57 pm
@Mike - I agree completely! If enough of us make the suggestion to Alex maybe he’ll make that change. Alternately, someone could also make the change and submit it to Alex.
August 16th, 2008 at 3:33 am
Another glitch seems to be that if I use [singlepic=1,100,,] to put a thumbnail of an image in a blog page then the whole area to the right of that thumbnail is clickable, and not just the image itself.
I’m not too sure if this is a problem with my usage of the singlepic command or the underlying code itself
August 17th, 2008 at 7:03 am
[...] article gives various instructions for displaying images. It is set at Singlepic, but from the top menu you [...]
August 30th, 2008 at 5:57 pm
My wishlist would include being able to ad a caption to the singlepic, just like can be added when displaying a gallery. If one of the singlepic parameters was to display the alt/title text for a photo that would be great.
I also like your idea of being able to have it not link anywhere or being able to specify a link out for a singlepic. It would also be nice if you could have it link to a gallery page that it is a part of.
October 9th, 2008 at 2:45 am
I think the most important feature to add next is for thumbnailing the images. All the pictures I upload are 1280×1024 and my blog posts are typically an “image story”, so this is actually killing peoples machines sometimes.
I did solve this by thumbnailing all images but then I swapped to nextgen so the problem is back.
What would be really nice would be if on first view, nextgen generates the thumbs according to the size parameters given to the singlepic command, and then subsqeuently it can just use this thumb.
October 27th, 2008 at 7:08 am
Is there a way to link text to an image? I tried implementing a solution posted to the Wordpress forum with no luck:
http://wordpress.org/support/topic/207887
Thanks!
October 30th, 2008 at 2:17 am
The solution to the problem seperating the text from the image and align the image is simply to edit the css settings for Singel picture as illustrated below (this can easily be done through the control panel in Gallery). I changed the values for margin to suit my liking and everything shows up without problems now!
/* ———– Single picture ————-*/
.ngg-singlepic {
background-color:#FFFFFF;
border:1px solid #A9A9A9;
display:block;
margin:4px 8px 2px 5px;
padding:10px;
position:relative;
November 8th, 2008 at 12:28 am
Is there a way to have the images link to a page in wordpress rather than the effect? Also,is there a way to add text under each image in the gallery? I would like to have a gallery set up and a page for each image.
November 12th, 2008 at 3:51 pm
Hi David,
Is there a method to have the thumbnails scaled versions rather than cropped versions. I have a lot of images of people with their heads chopped off… Or is there away to specify a different image to be used as the thumbnail. Thanks for your help.
Mike
December 8th, 2008 at 6:55 am
Hi David,
Great blog, thanks.
Been hacking away at a site using WP and NextGEN as the backbone.
I was using [thumbnail=xxxx,right] on a page to place single images, as the singlepic uses the full size image and i was placing 20+ images.
It was working fine until today and now the page just shows [thumbnail=xxxx,right] where the image should be, any ideas of what might have happeneed? Seems the thumbnail code doesn’t work anymore.
December 8th, 2008 at 7:04 am
Sorry, found the error, i was using a hacked version of nggfunctions.php from a link here
http://wordpress.org/support/topic/189773?replies=16
Just forgot where i found it!
February 3rd, 2009 at 7:49 pm
Is there a way to crop the single pics so they are a fixed width and height? For example, I have a few thumbnails that I want to be 50px x 50px. Thanks for your help.
February 20th, 2009 at 6:20 am
I upgraded NexgenGallery from 1.1.0 to 0.96 and has no space between picture and text.
I tried to change the CSS files without success.
I copied the files from the old CSS us without success.
Now I returned to the old version.
How can I increase the space between picture and text when using float?
Thanks very much anticipated.
March 17th, 2009 at 3:22 am
daft newbie question I am sure; everything here has really helped me but I have a question re positioning thumbnails as single pics….
I would like to add the single pic on the left (can do that) but then centre the writing to the right of the pic, so that it is in line with the middle of the picture on the rhs. It’s coming up below it. Any ideas really welcomed! Also, is it possible to add a link through on the single pic image in the same way as when you link through with a gallery?
basically I would like my home page to be a series of thumbnails and/or images with titles to the rhs that click through to other pages; but also to have images click through too.
Thanks!
May 17th, 2009 at 9:37 am
HELP! Anyone… please.
My nextgen gallery seems to have stopped some of it’s function! Flash upload no longer works, but regular upload does. The tinymce button in the visual post editor with bring up my website in another window when click with a “page not found” error… it no longer brings up the actual nextgen gallery window??? (Which is really confusing.) I can still use nggallery id= to place galleries, but singlepic no longer places an image, just a clickable link to the photo file’s name.
I haven’t upgraded anything or changed anything… all of a sudden it just started acting this way! I would simply avoid the tinymce button and use code, but with the singlepic not working I can’t add images.
Anyone help with this? Seen anything like it? Thank you.
May 27th, 2009 at 8:56 pm
Eric - I had your exact same problem. My issue turned out to be a permissions problem. I upped my permissions to 777 on all image files and they were able to cache fine. Hope this helps!
June 13th, 2009 at 1:54 am
Hello David,
I feel the second wish suggested by you as below for singlepic display is very very much needed and helpful and I hope it will be implemented by the plugin authour shortly.
“It would be nice if the image could be displayed with no link so that a custom link could be specified instead. For example, I would like to be able to display an image and have it link to another web page or web site rather than bring up the “full size” image.”
June 23rd, 2009 at 10:50 am
I’ve got this error mesage wen i try to ad a single pic:
You do not have the GD Library installed. This class requires the GD library to function properly. visit http://us2.php.net/manual/en/ref.image.php for more information
August 15th, 2009 at 7:38 pm
Hi - I am having issues with single pic option showing less than average quality resolution when displayed on my blog page - when u click it it expands into the correct resolution - is there anyway of being able to display my pictures and a reasonable quality on my blog page without having to expand them? Check out my blog - Daniel’s Blog - to see what i mean.
thanks daniel
August 28th, 2009 at 10:45 am
Looks like there is a hack you can use to get your #2 wish.
This forum thread talks about how you can hack NextGen so that you can have the “click” option send you to a url instead of a larger image.
http://wordpress.org/support/topic/298551?replies=12
Cheers.
November 17th, 2009 at 9:45 am
Hi there,
my [singlepic=id,...] doesn’t seem to work. it says [SinglePic not found].
I have entered [singlepic=3,300,400,web20,center] in a post html code;
how does the code know from which gallery to take the id=3, as I have several galleries?
November 17th, 2009 at 10:21 am
I just got the answer, my snippet tag syntax was wrong.
however, I have another question:
How do you make the nextgen work in a sidebar? I do not want to use the nextgen widget as it does not give me the features I am looking for. I am trying to display a single image in a sidebar widget holder, using the lightbox effect for the hyperlink.
Anybody?
thanks
February 12th, 2010 at 7:54 am
Hi guys,
I also use the NextGen Gallery and it worked rather well until a strange error occured. If I have a certain amount of pictures oder headlines or other things in my article, the whole article disappears. The main headline and the tags are displayed, but not the article itself anymore. If I take out a few pictures or some formated text, it’s working.
I posted it in the official forum, but I haven’t got an answere
Can anyone of you maybe help me?
http://wordpress.org/support/topic/333283
February 20th, 2010 at 11:39 pm
I am just wondering if there is a way to change the default size of the single pic, so I don’t have to change the dimesions each time?