I’m not familiar with exactly how nextgen-gallery does it, but typically for lightbox effects you need to add rel="lightbox"
to the image tag for it to work. To do that you’d do something like this:
$attr = array(
'rel' => "lightbox",
true) )),
);
echo wp_get_attachment_image( get_post_meta( get_the_ID(), 'afp_analysis_chart' , true), 'large', 0, $attr );
Related Posts:
- WP 4.4. responsive images browser choosing the “wrong” one
- Remove images (files) that were generated when using add_image_size()
- Using Images in WordPress – Best Practices
- Change html structure of all img tags in WordPress
- How to create thumbnails with a fixed width, so all of them will have the same width?
- Change the output for [gallery] shortcode
- Creating a rotating header /image slider using theme customization
- Adding HTML within an image title attribute
- Use Media Library to manage galleries like Nextgen (with folders, albums, collections, tags, categories, terms…)
- How to add php to theme to show alt attributes
- How to Display an Image Uploaded through a Meta Box in a Template?
- How do I delete thousands of unattached images?
- Display different header images based on current page
- How to remove link from an image in a post?
- Change html structure of all img tags in WordPress
- Limit author image size
- Setup A Default Featured Image
- Retrieving images from a NextGEN gallery
- Why is wordpress searching for @2x images?
- What’s the best “insert all images” plugin?
- Any way to “combine” galleries or show multiple galleries as one?
- Can I the caption shortcode to set caption to a data attribute, and with the image’s alignment intact?
- Remove image classes from post thumbnail output
- How can I make all post image uploads have data-width and data-height attributes automatically by default?
- Photography Based Design – Multiple Images Per Post
- SEO images in Nextgen Galleries
- wp_upload_bits does not retrieve images that do not have an extension
- How to create ‘Local’ filters for WordPress srcset sizes in template parts?
- Get ALT attribute from title post (code not work)
- Image LazyLoad plugin not loading jQuery dependancies with wp_enqueue_script in WP 3.3.1
- How to check for images before echo
- Remove height attribute from wp_get_attachment
- HowTo: develop WP template with dynamic background image
- Images give 404 after changing default domain
- NextGEN Gallery – open all images on page in fancybox [closed]
- Need custom picture field for pages
- NextGEN Conditional Statement [closed]
- One picture belonging different galleries?
- Disable save as image on smartphones using all browsers ( chrome, firefox, ie, cm, opera )
- I want to rel=nofollow wordpress images
- How to pass on a value as parameter via url to another page
- How to create a title images for different posts?
- How to enlarge thumbnail on mouseover?
- How to get rid of undefined variable in previous post image
- How to make image uploads default to full size?
- How to add php to theme to show alt attributes
- WordPress 404 Images – Images not found after deleted from media
- second featured post not displaying on page [closed]
- Alt attribute is not showing while the value is given in Media
- WooCommerce Variation Swatches and Photos – get attribute thumbnail
- Get “Image CSS Class” value from the Advanced Options section
- Unable to delete images in Media Library
- Dinamically modifying attributes of images on posts
- How to add multiple images in a page
- Only User Upload image Http Error
- Remove “align” attribute on images
- Upload button in metabox not working
- Show uploaded images in full size
- Saving a post, content filtering and user levels
- Slider do not add alt attribute. Cant get alt attribute from a media library!
- How do I add a nested conditional within an echo – to use a default image if there isn’t one in the post?
- Why images are disappearing on WordPress web site?
- Img alt tag showing different value then entered
- Featured Image not changing
- Uploaded Media Images on Site
- show hide image script after 4 seconds [closed]
- How to change the default registration email ? (plugin and/or non-plugin)
- Restricting users to view only media library items they have uploaded?
- Opinions and recommendations on the best barebones base theme [closed]
- How do I disable responsive images in WP 4.4?
- Filter to remove image dimension attributes?
- How to get a list of all the possible thumbnail sizes set within a theme
- How do I get the avatar URL instead of an HTML IMG tag when using get_avatar?
- Image Upload from URL
- Programmatically adding images to media library
- How do I delete all UNUSED images from my uploads directory?
- Set default image sizes in WordPress to hard crop
- Is it possible set a featured image with external image URL
- get attachment title based on attachment id
- Stop wordpress from hardcoding img width and height attributes
- Creating an Image-Centric Custom Post Type?
- Handle issues with change of image scaling (rounding) in 4.1 (WP Ticket #18532)
- Programmatically get images by URL and save in uploads folder
- Prevent WordPress from generating medium_large 768px size of image uploads?
- remove or update add_image_size
- Get Image Description
- How to extend the gallery block in Gutenberg?
- Image quality based on image size
- Function to get URL of original uploaded image – full size
- how to get original image using wp_get_attachment_image_src
- What is a good alternative to using $content_width for image optimization?
- get the attachement url for the medium sized image
- Can I attach image to post without adding it to post?
- Automatically replace original uploaded image with large image size
- WordPress crop tool greyed out
- How to scale up featured post thumbnail?
- Upload images to remote server
- Custom image size / thumbnail – Crop to aspect ratio even when source image is smaller than set dimensions
- Each custom image size in custom upload directory?
- Getting Images from theme’s directory in pages