PreviewLayer
PreviewLayer WordPress plugin for branded social share preview images
by Rayhan Sardar · github.com/rayhansysmin/previewlayer · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/rayhansysmin/previewlayer/releases/download/v2.1.0/previewlayer.zipReadme
PreviewLayer - WordPress Open Graph Image Overlay Plugin
PreviewLayer is a standalone WordPress plugin for creating branded social share preview images. It adds logo overlays, sponsor badges, watermarks, or campaign graphics to Open Graph and Twitter Card images without changing the visible featured image on your website.
Use PreviewLayer when you need a WordPress Open Graph image plugin, a social media preview image editor, a featured image watermark tool, or WooCommerce product share image branding.
What PreviewLayer Does
PreviewLayer generates a separate 1200x630 social preview image for posts, pages, WooCommerce products, and public custom post types. The plugin keeps your normal featured image untouched while social platforms receive a branded image through Open Graph and Twitter Card meta tags.
Common use cases:
- Add a website logo to every shared article image.
- Add a sponsor badge to news, blog, or campaign posts.
- Create WooCommerce product share images with a consistent brand overlay.
- Use different social preview images for individual posts or pages.
- Apply category-specific overlays for editorial sections, product groups, directories, or niche content types.
Key Features
| Feature | Details |
|---|---|
| 9 overlay positions | Top, center, bottom, left, right, and corner placements. |
| Post-wise settings | Set overlay, position, custom social image, or enable/disable per post, page, product, or custom post type. |
| Category-wise settings | Apply overlay rules to categories and WooCommerce product categories. |
| WooCommerce support | Generate branded social preview images for products. |
| Custom post type support | Enable PreviewLayer for public post types such as property, car, listing, directory, portfolio, or event. |
| Social-only image | Upload a different featured image for social media only. |
| Old post cutoff | Disable generated images for posts older than a selected date. |
| Full-width image generation | Creates social-friendly 1200x630 images from landscape, portrait, or square images. |
| SEO plugin compatibility | Works with Yoast SEO, Rank Math, Jetpack, All in One SEO, SEOPress, Open Graph, and Twitter Card plugins. |
| Cleanup option | Optionally remove generated plugin data when deleting the plugin. |
SEO And Social Preview Benefits
PreviewLayer helps WordPress site owners keep social media previews consistent and branded. Better social preview images can improve click-through rate, brand recognition, sponsor visibility, and content presentation on Facebook, X/Twitter, WhatsApp, Telegram, LinkedIn, and other platforms that read Open Graph images.
Targeted plugin uses:
- WordPress Open Graph image overlay.
- Social media share preview image generator.
- WooCommerce product Open Graph image branding.
- Featured image watermark for social sharing.
- Twitter Card image overlay for WordPress.
- Category-based social image watermark.
Integrations
PreviewLayer can work alongside popular SEO and Open Graph plugins:
- Yoast SEO
- Rank Math
- Jetpack
- All in One SEO
- SEOPress
- Open Graph and Twitter Card meta tag plugins
Requirements
- WordPress 5.8 or newer.
- PHP 7.0 or newer.
- Imagick or PHP GD for image generation.
- Writable
wp-content/uploadsdirectory.
Installation
- Download the latest release ZIP from GitHub Releases.
- In WordPress admin, go to Plugins > Add New > Upload Plugin.
- Upload
previewlayer.zip. - Activate PreviewLayer.
- Go to PreviewLayer in the WordPress admin menu.
- Add at least one overlay image.
- Choose default overlay settings and save changes.
WordPress.org Assets
The release includes a separate previewlayer-wporg-assets.zip package for WordPress.org directory assets:
- Banner images.
- Plugin icons.
- Screenshots.
These files are intentionally separate from the installable plugin ZIP.
File Structure
previewlayer.php
readme.txt
assets/
css/
images/
js/
includes/
admin/
common.php
frontend.php
Development
Main plugin file:
previewlayer.php
Build installable plugin ZIP from a parent directory:
Compress-Archive -Path previewlayer -DestinationPath previewlayer.zip
Author
Rayhan Sardar
GitHub: RayhanSysMin
License
GPLv2 or later. See readme.txt and plugin header for license details.
Read the full README on GitHub →