PHPackages                             xemlock/wp-post-thumbnail-endpoint - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. xemlock/wp-post-thumbnail-endpoint

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xemlock/wp-post-thumbnail-endpoint
==================================

A WordPress plugin that provides a special URL for accessing Post Thumbnails by their corresponding Post ID

v0.1.0(10y ago)218MITPHP

Since Sep 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/xemlock/wp-post-thumbnail-endpoint)[ Packagist](https://packagist.org/packages/xemlock/wp-post-thumbnail-endpoint)[ RSS](/packages/xemlock-wp-post-thumbnail-endpoint/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

WP Post Thumbnail Endpoint
==========================

[](#wp-post-thumbnail-endpoint)

This WordPress plugin provides a special URL dependent only on Post ID that, when visited, redirects to the [Post Thumbnail](https://codex.wordpress.org/Post_Thumbnails) (aka Featured Image) corresponding to the provided ID.

This can particularily be useful when implementing client-side JavaScript features (in a theme or plugin) that need to display Post Thumbnail based only on Post ID, without sending additional AJAX requests.

Installation
------------

[](#installation)

Place the Plugin directory inside `wp-content/plugins` in your WordPress installation. Then go to [plugins administration screen](https://codex.wordpress.org/Administration_Screens#Plugins) and activate the Plugin.

You can also directly include the main plugin file `plugin.php` in your own plugin or theme. This plugin will be active as long as the plugin or theme referencing it remains active.

Usage
-----

[](#usage)

### Post thumbnail URL

[](#post-thumbnail-url)

Once the plugin has been installed, post thumbnails are accessible via the following URL:

```
/index.php?post_thumbnail=POST_ID

```

or, if pretty permalinks are enabled, via:

```
/post_thumbnail/POST_ID

```

Post thumbnail size may be specified in the URL either by adding `size` query variable to the raw URL:

```
/index.php?post_thumbnail=POST_ID&size=SIZE

```

or by appending it to the pretty URL:

```
/post_thumbnail/POST_ID/SIZE

```

The size provided in the URL must be one of the registered thumbnail size names, i.e. [built-in sizes](https://codex.wordpress.org/Post_Thumbnails#Thumbnail_Sizes) ("thumbnail", "medium", "large" and "full") or those added explicitly via `add_image_size()`. Unrecognized size names will be ignored, which will result in redirection to the original (unresized) image.

### Functions

[](#functions)

The Plugin provides two functions for building unified post thumbnail URLs:

- `get_post_thumbnail_endpoint_structure()`

    which returns the current structure for unified URLs, with `post_id` and `size` parameters given as `%post_id%` and `%size%` respectively. This can be used as an URL template on the client side.
- `get_post_thumbnail_endpoint( $post_id [, $size ] )`

    which returns the unified post thumbnail URL for the given post ID and optionally specified thumbnail size

Disclaimer
----------

[](#disclaimer)

This plugin is intended for use by theme/plugin developers rather than end users, as it provides no usable functionality for the latter.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3879d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e25386cfbb47a00cd5de1c377cc5494be83bb22f553fedbdaf0846dd1909b4b?d=identicon)[xemlock](/maintainers/xemlock)

---

Top Contributors

[![xemlock](https://avatars.githubusercontent.com/u/952555?v=4)](https://github.com/xemlock "xemlock (9 commits)")

### Embed Badge

![Health badge](/badges/xemlock-wp-post-thumbnail-endpoint/health.svg)

```
[![Health](https://phpackages.com/badges/xemlock-wp-post-thumbnail-endpoint/health.svg)](https://phpackages.com/packages/xemlock-wp-post-thumbnail-endpoint)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
