WordPress screenshot plugin alternative: use the Allscreenshots API
Riley ThompsonMar 7, 20267 min read
Find out how easy it is to capture and share pixel-perfect screenshots at scale using Allscreenshots. Sign up for a free account and start integrating your first screenshot API call today.
RT
Riley Thompson
Developer advocate focused on web tooling, screenshot APIs, and helping teams ship better visual experiences.
Most WordPress screenshot plugins are heavy, outdated, and rely on free screenshot services that return low-quality results. The Allscreenshots API gives you pixel-perfect captures with a lightweight shortcode — no plugin bloat required.
What you'll build
A WordPress shortcode that lets you embed website screenshots anywhere on your site: [screenshot url="https://example.com"]. It captures the page on first load and caches the result so it doesn't re-capture on every page view.
The first time a visitor loads the page, the screenshot is captured and cached for 24 hours. Subsequent page loads use the cached URL.
Using with Gutenberg
In the Gutenberg editor, add a Shortcode block and paste the shortcode. The screenshot renders on the frontend.
Using with page builders
The shortcode works in any page builder:
Elementor: Add a Shortcode widget
Divi: Use the Code module
WPBakery: Use the Raw HTML element
Beaver Builder: Add an HTML module
Customizing the cache duration
By default, screenshots are cached for 24 hours. To change this, modify the set_transient call:
// Cache for 1 weekset_transient($cache_key,$screenshot_url,WEEK_IN_SECONDS);// Cache for 1 hourset_transient($cache_key,$screenshot_url,HOUR_IN_SECONDS);// No cache (captures on every page load — not recommended)// Remove the get_transient/set_transient logic
Clearing the cache
To force a re-capture, you can clear WordPress transients:
// Add this as a helper functionfunctionclear_screenshot_cache($url){$cache_key='ascr_'.md5($url.'1280'.'false');delete_transient($cache_key);}
Or clear all screenshot caches at once via the database:
DELETEFROM wp_options WHERE option_name LIKE'_transient_ascr_%';
Building a link directory
If you're building a link directory or resource page, combine the shortcode with a custom post type or ACF fields:
// In your template file$websites=get_posts(['post_type'=>'website','numberposts'=>-1]);foreach($websitesas$site){$url=get_field('website_url',$site->ID);echo'<div class="website-card">';echo'<h3>'.esc_html($site->post_title).'</h3>';echodo_shortcode('[screenshot url="'.esc_url($url).'"]');echo'</div>';}
Why not use a plugin?
Most WordPress screenshot plugins have drawbacks:
Heavy dependencies — Some bundle Puppeteer or rely on deprecated services
Low quality — Free screenshot services often return blurry or outdated captures
Slow — Plugin-based solutions add significant page load time
Unmaintained — Many haven't been updated in years
The shortcode approach above is about 50 lines of code, has zero dependencies, caches aggressively, and uses a production-grade screenshot API.
Wrapping up
A lightweight shortcode beats a bloated plugin. You get pixel-perfect screenshots, aggressive caching, and full control over the rendering options — viewport size, full-page capture, dark mode, and more.