Skip to main content

Overview

Visual Portfolio provides built-in lightbox functionality for displaying images, videos, and other media in popup overlays. The plugin supports multiple lightbox vendors and extensive customization options.
Lightbox settings are configured in the vp_popup_gallery section at classes/class-settings.php:208

Supported Vendors

Visual Portfolio includes two popular lightbox libraries:

Fancybox

Modern, touch-enabled lightbox with smooth animations.
Features:
  • Modern UI design
  • Touch and swipe gestures
  • Video support (YouTube, Vimeo)
  • Zoom functionality
  • Responsive design
Integration:

PhotoSwipe

Lightweight, mobile-friendly image gallery.
Features:
  • Minimal UI
  • No dependencies
  • Hardware-accelerated animations
  • History API support
  • Fullscreen mode
PhotoSwipe is recommended for image-heavy portfolios due to its lightweight nature and excellent mobile performance.

Click Actions

Configure what happens when users click portfolio items:
Open images in lightbox overlay with gallery navigation. Configuration Options:

URL

Direct link to custom URL or post permalink.

None

Disable click actions entirely.

Global Settings

Configure lightbox behavior globally:

Enable for WordPress Images

When enabled, the lightbox applies to:
  • WordPress gallery blocks
  • Individual image blocks
  • Images in content with data-fancybox or lightbox classes

Asset Management

Lightbox scripts are conditionally loaded:
Lightbox assets are only loaded when needed to optimize performance. The plugin detects popup usage and enqueues scripts accordingly.

Third-Party Integrations

Elementor Lightbox Conflict Resolution

Enfold Theme Integration

Media Types

Supported media types in lightbox:
Standard image formats:
  • JPEG
  • PNG
  • GIF
  • WebP
  • SVG

oEmbed Integration

Automatic video embedding in lightbox:

Premium Features

The following features are available in Visual Portfolio Pro:

Pro Features Include:

  • Media Priority - Control which media displays first in galleries
  • Quick View - Post content preview in lightbox
  • Deep Linking - Direct URLs to specific popup items
  • Custom Popup Images - Use different images for popup vs. thumbnail
  • Video Galleries - Advanced video playlist features

Customization

Custom CSS

Target lightbox elements:

JavaScript Hooks

Filter Hooks

Performance Optimization

Lightbox images support lazy loading:
  • Images load only when lightbox opens
  • Reduces initial page load time
  • Compatible with lazy loading plugins
  • oEmbed data cached for 24 hours
  • Lightbox markup cached
  • Scripts concatenated and minified

Accessibility

Lightbox implementation follows accessibility best practices:
  • Keyboard navigation (arrow keys, ESC)
  • Screen reader support
  • Focus management
  • ARIA attributes
  • Skip links for navigation

Troubleshooting

Check:
  • Image URLs are valid
  • CORS settings for external images
  • PHP memory limit for large images
Verify:
  • oEmbed URL format is correct
  • Video is publicly accessible
  • Provider supports embedding

See Also

Item Styles

Configure item click actions

Assets Management

Understanding asset loading

Third-Party Integrations

Plugin compatibility features

Settings API

Global lightbox settings