You can just use the built in ThickBox. Maybe not the pretties library but it does its job.
Just add the class thickbox to the link and add the image to the href
Here is a simple example:
<?php echo '<a href="https://wordpress.stackexchange.com/questions/78749/image.png" class="thickbox">'. __('Test image', 'domain') .'</a>'; ?>
Read more about ThickBox here.
Related Posts:
- Local WordPress installation doesn’t crop images
- HTML Img with data:image src gets sanitized in admin?
- Edit Page did not get refresh after update
- Upload error on localhost (at minimum, not yet tested online)
- How to attach post ID to image links in WordPress tinymce editor
- Admin bar stats widget plugin image broken
- How do I disable responsive images in WP 4.4?
- Set default image sizes in WordPress to hard crop
- How to delete resized (cropped) image uploads and prevent future resizing?
- After Moving a Site to Another Domain, All Images Are Lost
- Remove images (files) that were generated when using add_image_size()
- How to display a page’s featured image?
- Featured image shortcode
- How to find attachment by it’s name?
- Displaying images from external RSS feeds?
- Why should I use “Organize my uploads into month- and year-based folders” option? (Cons/Pros)
- Cropped featured image replaces original image in gallery
- Which action hook can I use when a featured image has been selected
- Displaying images with relative paths in the editor
- Prevent image upload unless exact size
- Use Media upload in custom widget on wordpress 3.5
- Theme Customiser Image Control
- Fixing external image urls
- Associate an existing image with a post
- Need help building a filter to edit the output of “image_send_to_editor”
- How to disable “insert into post” only when selecting the Featured Image?
- Is there a way to define a default caption to all uploaded images
- How can I add the “Use as featured image” to a custom metabox?
- Image resize with image url
- Preview Image Path in Admin Section
- How to remove title attribute from gallery links and images
- Dynamic-Image-Resize Plugin does not output anything
- The WordPress Gallery, Grabbing The Link and Images?
- How to upload image without post ID using the new media uploader?
- How to default all users to no link for attachments?
- How to output placeholder image if no featured image set?
- Featured Images on Front Page
- Display different header images based on current page
- How to place an image into header.php? [closed]
- Uploading an image as featured image from frontend form
- How to upload images from my directory into my wordpress?
- Ability to edit image via WYSIWYG
- Add a featured image in my theme?
- Why images/photos after being uploaded to my wordpress site get slightly blurry?
- @wordpress/create-block image url in css
- How does WordPress work out the srcsets?
- How to include a picture in a blog post such that it will show in Facebook?
- Remove ‘wp-content/themes/themename/’ from Image path
- help getting featured image using get_posts
- Featured Image .svg height and width 1px only
- Extend core block attributes in post content
- Why html tags are being appended to my pictures?
- Why can I not view image attachment pages?
- Images are randomly deleted from server
- Rename image file by post title
- Set a background color per image added to a post
- Restrict Image Uploads to a Certain File Type
- Rename media files generated during upload
- Featured image (responsive) above content is too small after update to WordPress 4.4
- How to show only posts with images?
- add_image_size() to crop images into squares?
- How to create a simple slideshow out of a post image gallery?
- How Do I Delete All The Images from WordPress
- Consolidating two websites into one, but migrated images not appearing in Image Library
- Lazyload post thumbnails
- Is there a way to change wordpress image resize settings?
- How to change the target size of images clicked on in WordPress standard gallery
- Retrieving an alt tag from a custom field
- Exclude featured image from gallery in wp-admin
- Large size image breaks template layout
- Trying to create a mouseover effect in html using Gutenberg editor
- Replace original image, WP image editor
- WP Responsive images – upload custom image sizes
- Images not loading after migration
- How to output images as figure/figcaption
- Make Images appear in the same order as in media browser using get children?
- wordpress get gallery images title
- Taxonomies image
- How to wrap normal image tag with figure HTML5 element
- How to fix “.webp” being auto-added to the end of image urls
- Customizing the attachement page to show rest of all images in a gallery from post
- Disable all resizing and compression
- Update old Post image metadata to ‘thumbnail’ wp_attached_file
- having issue while uploading An error occured in the upload. Please try again later
- How to change image atributes right before an image to be saved?
- Is it possible to change ‘Link to’ in all images in all articles?
- Control Responsive Images
- Is it possible to put images as url in document [closed]
- Creating ‘required’ fields in the ‘add media’ window
- Importing images results to wrong folder structure
- WP keeps looking up post thumbnail on https even though wp-config says http
- How to post a mosaic of an image gallery instead of the entire gallery inside a post’ [closed]
- How to throw admin notice error on image upload
- Get size of smaller image version
- How to add an image to the post preview in the free theme “food recipes”
- I am getting useless alphabets in images link
- How to replace images?
- using media_sideload_image with a file from theme directory
- wp_get_attachment_image_src() returning incorrect width and height [duplicate]
- Blank upload.php page