How to Use PagePeeker Screenshots in WordPress Featured Images
Generate a PagePeeker screenshot, add it to the WordPress Media Library, then assign its attachment ID as the featured image.
Short answer: generate or retrieve the website screenshot with PagePeeker, save it as an image, upload it to the WordPress Media Library, and select it under Set featured image. For automation, first make the screenshot a WordPress media attachment, then set the post’s featured_media field to that attachment’s integer ID. A PagePeeker image URL alone is not the WordPress featured-media value.
PagePeeker documents screenshot generation and retrieval, while WordPress documents featured-image selection and attachment-ID assignment as separate steps. The official sources reviewed do not establish a native PagePeeker-to-WordPress plugin or one-step transfer. PagePeeker’s API documentation and the WordPress editor guide describe the respective workflows.
1. Generate and retrieve the PagePeeker screenshot
PagePeeker’s documentation recommends API V2; it says the original V1 is discontinued and redirects to V2. Its direct-linking option embeds an image URL, while the documented server-side flow requests a refreshed thumbnail, polls the thumbnail-ready endpoint, then downloads the resulting image. The URL supplied to the API should be URL-encoded. Consult the current PagePeeker documentation for the exact endpoint, parameters, and account requirements before implementing requests.
For a one-off, retrieve the image and save it somewhere you can select during upload. For an automated pipeline, download the completed image bytes and keep the file or bytes available for the WordPress media-upload step. Do not assume that embedding or storing a remote PagePeeker URL creates an item in the WordPress Media Library.
PagePeeker documents response headers for paid and unbranded accounts, including capture method, capture time, final redirected URL, capture hash, timestamp, and error status. Do not assume those headers are present on every account tier. Its documentation also describes some options, such as waiting for generation, as premium-account features; check current account terms before relying on them.
2. Set the featured image in the WordPress editor
- Open the post or page in the WordPress editor.
- Open the settings sidebar and locate the featured-image control.
- Choose an existing image in the Media Library, or upload the screenshot image you saved.
- Select the image and click Set featured image.
- Preview the post on the site and check the result at the sizes where the theme displays it.
The WordPress settings-sidebar guide documents selecting or uploading an image through the featured-image control. Themes decide where and how featured images appear, and may crop them differently, so check the published layout.
3. Assign a screenshot through the WordPress REST API
The REST API field featured_media is an integer media ID. Upload or otherwise create the screenshot as a WordPress media attachment first, obtain its ID, and then use that ID when creating or updating the post. The Pages REST API reference documents the field; set_post_thumbnail() and the REST controller’s featured-media handler describe the assignment behavior.
// Request shape only: replace POST_ID and ATTACHMENT_ID with real values.
// Authenticate using a method configured for your WordPress site.
const response = await fetch('https://your-wordpress-site.example/wp-json/wp/v2/posts/POST_ID', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_CONFIGURED_CREDENTIALS'
},
body: JSON.stringify({ featured_media: ATTACHMENT_ID })
});
if (!response.ok) {
throw new Error(`WordPress returned ${response.status}: ${await response.text()}`);
}
const post = await response.json();
console.log(post.featured_media);
This example shows the assignment request after an attachment ID is available; it does not implement media upload or prescribe an authentication method. WordPress authentication, permissions, post type support, media upload, and any remote-image sideloading need to be implemented and verified for the specific site. Use credentials appropriate for your installation and do not put secrets in browser-side code.
Manual or automated: which route fits?
| Route | Best for | What it requires |
|---|---|---|
| Editor upload | Occasional screenshots | Save the image, upload or select it, and set it in the editor. |
| REST/API workflow | Repeatable publishing automation | A WordPress media attachment ID, configured authentication, and code to upload or otherwise create the attachment. |
4. Check the result
- Confirm the screenshot is visible in the Media Library as an attachment.
- Confirm the editor shows the intended image in the featured-image control.
- For REST automation, check that the post’s
featured_mediavalue matches the attachment ID. - Preview the post using the site’s theme. Check for cropping, aspect ratio, and placement at the relevant page sizes.
Featured-image presentation depends on the theme, so a correct attachment assignment does not guarantee a particular crop or display position.
5. Troubleshooting
| Problem | Likely cause | What to check |
|---|---|---|
| The screenshot URL does not set the featured image | A remote URL is being treated as if it were a WordPress media ID. | Make the image a WordPress media attachment, obtain its integer ID, then assign that ID. |
The REST update rejects featured_media |
The value may not be a valid attachment ID, or the request may lack permission. | Verify the ID belongs to an attachment on that site and check the response status and body, authentication, and permissions. |
| The featured-image control is unavailable | The current editor context or post type may not expose the control. | Check the editor sidebar and whether the post type supports featured images in the site’s configuration. |
| The image looks cropped or appears in an unexpected place | The theme controls featured-image display and may use its own crop or placement. | Preview the post with the active theme and check the image’s dimensions and layout. |
| PagePeeker has not returned an image yet | Thumbnail generation may still be in progress, or the request parameters/account capabilities may not support the chosen flow. | Follow the documented refresh, readiness-polling, and download sequence; confirm the current V2 parameters and account terms. |
| Expected PagePeeker response headers are missing | The documentation describes some headers for paid and unbranded accounts, not necessarily every tier. | Check the account tier and current API documentation; do not make required workflow decisions based on unavailable headers. |
6. Reliability, performance, and cost considerations
The workflow has two distinct operations: obtaining the screenshot and making it a WordPress attachment. For automation, handle PagePeeker generation readiness before downloading, then verify that the WordPress upload succeeded before assigning the attachment ID. A failed upload should not be followed by an assignment using a missing or stale ID. The cited documentation does not provide performance benchmarks, so allow for generation and upload time according to the actual service responses rather than assuming a fixed duration.
PagePeeker’s current prices were not established by the research for this article. Check its current documentation or account information for plan and feature availability, especially for premium options. WordPress hosting, storage, and any implementation costs depend on the site and are not specified by the cited sources.
Or skip the browser setup
If your main job is getting a clean screenshot file to attach in WordPress, ScreenshotNeo can return an image directly from one GET request. Its API documentation covers the available options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo removes cookie banners, popups, and chat widgets before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. You still need to upload the resulting image to WordPress and set it as the featured image.
Sign up free for 1,000 screenshots a month, with no card required.
FAQ
Does WordPress accept a PagePeeker URL directly as featured_media?
No. The REST field is an integer media attachment ID. First make the screenshot available to WordPress as an attachment.
Will the featured image look the same in every WordPress theme?
No. Themes determine where and how the featured image is displayed, including its presentation and crop.
Is there an official one-click PagePeeker integration in WordPress?
The official sources reviewed document PagePeeker screenshot generation and WordPress featured-image assignment separately; they do not establish a native plugin or one-click transfer. This is a limit of the reviewed sources, not proof that no third-party integration exists.


