PHPackages                             waughj/wp-post-thumbnail - 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. [Image &amp; Media](/categories/media)
4. /
5. waughj/wp-post-thumbnail

ActiveLibrary[Image &amp; Media](/categories/media)

waughj/wp-post-thumbnail
========================

Simple class for getting WordPress thumbnail

v0.5.0(6y ago)0911AGPL-3.0-or-laterPHPPHP &gt;=7.0

Since May 13Pushed 6y agoCompare

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

READMEChangelog (7)Dependencies (2)Versions (8)Used By (1)

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

[](#wp-post-thumbnail)

Simple class for getting WordPress thumbnail.

How to Use
----------

[](#how-to-use)

Create a WPPostThumbnail instance by passing the constructor a post ID. Then, call that instance's getHTML method to generate its responsive picture HTML.

Pass an array of attributes as the constructor's 2nd argument to customize the HTML.

By default, this generates a picture tag with responsive images. To generate a regular image instead, pass WPPostThumbnailType::image() to the 3rd argument. To set the size o’ that image, add a "size" attribute to the 2nd argument with the name o’ the WordPress media size ( "thumbnail", "medium", "medium\_large", "large", etc. )

Error Handling
--------------

[](#error-handling)

If the post for the given ID doesn’t have a thumbnail, it’ll throw a WPMissingPostThumbnailException exception.

Changelog
---------

[](#changelog)

### 0.5.0

[](#050)

- Make usable with both WPUploadPicture &amp; WPUploadImage.

### 0.4.0

[](#040)

- Implement WPUploadImage's WPMissingMediaException error handling

### 0.3.0

[](#030)

- Add Ability to Easily Cancel Showing Versioning

### 0.2.0

[](#020)

- Turn On Thumbnail Support in WordPress

### 0.1.0

[](#010)

- Initial release

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Every ~19 days

Recently: every ~29 days

Total

7

Last Release

2439d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11161078?v=4)[waughj](/maintainers/waughj)[@waughj](https://github.com/waughj)

---

Tags

thumbnailwordpress

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[stefangabos/zebra_image

A single-file, lightweight PHP library designed for efficient image manipulation featuring methods for modifying images and applying filters

141110.4k6](/packages/stefangabos-zebra-image)[lakshmaji/thumbnail

Thumbnails for videos

108122.2k](/packages/lakshmaji-thumbnail)[coldume/imagecraft

A reliable and extensible PHP image manipulation library

10133.7k2](/packages/coldume-imagecraft)[urlbox/screenshots

Use urlbox to easily generate website thumbnail screenshots from a URL

14250.4k](/packages/urlbox-screenshots)[toinekamps/responsive-pics

Responsive Pics is a Wordpress tool for resizing images on the fly.

831.2k](/packages/toinekamps-responsive-pics)

PHPackages © 2026

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