WP External Featured Image lets editors use remote images as if they were native featured images. Paste a direct .jpg/.png URL or a Flickr photo page and the plugin renders that image everywhere the theme calls the_post_thumbnail(). When enabled in the settings, it can also add Open Graph and Twitter Card tags so social shares pick up the same image.
- Toggle between native Media Library thumbnails and external URLs per post.
- Automatic Flickr integration (no authentication required) that resolves the best size for social sharing.
- Optional
<meta>tags for Open Graph and Twitter when an external image is active, including sensible fallbacks so required tags are never blank. - Works with any theme that relies on
has_post_thumbnail()/the_post_thumbnail()(including Twenty Twenty-Five). - Graceful error handling with inline editor notices and cached Flickr lookups to avoid repeat API calls.
- Copy the plugin folder into your WordPress
wp-content/plugins/directory. - Activate WP External Featured Image from the Plugins screen.
- Navigate to Settings → External Featured Image and enter your Flickr API key (required to resolve Flickr page URLs). Configure the default size preference, cache duration, and the Social Sharing options (toggle Open Graph/Twitter tags and provide a Facebook App ID if needed).
- Edit a post and open the Featured Image Source panel in the document settings sidebar.
- Select External and paste either:
- A direct HTTPS image URL ending in
.jpg,.jpeg,.png,.webp, or.avif, or - A direct HTTPS URL with no file extension (CDN/image-proxy URLs such as
https://cdn.example.com/image?id=123) — only when explicitly enabled via thexefi_allow_extensionless_image_urlsfilter (rejected by default), or - A Flickr photo page URL (e.g.
https://www.flickr.com/photos/user/1234567890/) or a Flickr short URL (e.g.https://flic.kr/p/abc123).
- A direct HTTPS image URL ending in
- Save or update the post. The plugin resolves Flickr URLs to the best available image size (preferring ≥1200px landscape when possible) and caches the result.
- On the front end, the external image is output wherever the theme requests the featured image. If you set a native featured image from the Media Library, it automatically overrides the external URL.
When enabled, the plugin also injects Open Graph and Twitter Card tags for external images so social platforms share the correct thumbnail. SEO plugins can disable this behaviour via the xefi_og_enabled filter or simply leave the checkbox disabled if another tool manages the tags.
xefi_should_override_thumbnail( $allow, $post_id )— Returnfalseto prevent external thumbnails for a post.xefi_resolve_flickr_sizes( $url, $sizes, $context )— Override the selected Flickr size URL.xefi_thumbnail_img_attrs( $attrs, $post_id )— Modify attributes on the generated<img>tag.xefi_thumbnail_sizes_attr( $sizes, $post_id, $size )— Override thesizesattribute used with the Flickrsrcset.xefi_og_enabled( $enabled, $post_id )— Disable Open Graph/Twitter tag output.xefi_og_site_name( $site_name )— Modify the generatedog:site_namevalue.xefi_fb_app_id( $app_id )— Filter the Facebook App ID used in Open Graph tags.xefi_cache_ttl( $seconds, $photo_id )— Adjust Flickr cache duration globally.
- Extensionless image URLs (e.g.
https://cdn.example.com/image?id=123) are rejected by default to avoid treating HTML pages as images. Sites that serve images this way can opt in by returningtruefrom thexefi_allow_extensionless_image_urlsfilter; the plugin never fetches the URL server-side (which would risk SSRF) — an opted-in URL is only ever loaded as an<img src>by the visitor's browser.
- WordPress 6.2 or later.
- PHP 8.0 or later.
- A Flickr API key to resolve Flickr page URLs.
All plugin source lives in this repository. The editor UI is written in vanilla JavaScript and does not require a build step.