PHPackages                             waughj/wp-theme-picture - 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. waughj/wp-theme-picture

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

waughj/wp-theme-picture
=======================

Class for autogenerating picture tag HTML for WordPress theme image.

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

Since May 16Pushed 6y agoCompare

[ Source](https://github.com/waughjai/wp-theme-picture)[ Packagist](https://packagist.org/packages/waughj/wp-theme-picture)[ RSS](/packages/waughj-wp-theme-picture/feed)WikiDiscussions master Synced 2mo ago

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

WP Theme Picture
================

[](#wp-theme-picture)

Class for autogenerating picture tag HTML for WordPress theme image.

Works just like HTMLPicture, but automatically applies WPThemeImage directory rather than expecting users to supply their own.

For a theme named “example” setup on :

```
use WaughJ\WPThemePicture\WPThemePicture;

$picture = new WPThemePicture( 'photo', 'jpg', '320w 240h, 800w 400h, 1200w 800h', [ 'directory' => 'img' ] );
$picture->print();

//    Will print out the following ( #s after m?= will vary ):
//
//
//
//
//
//

```

Like HTMLPicture, this will throw a MissingFileException if versioning is set on ( the default ) &amp; the server can’t find the file. Look @ the HTMLPicture documentation for mo’ information.

An easy way to deal with exceptions:

```
use WaughJ\FileLoader\MissingFileException;
use WaughJ\WPThemePicture\WPThemePicture;

try
{
	$picture = new WPThemePicture( 'photo', 'jpg', '320w 240h, 800w 400h, 1200w 800h, 2400w 600h', [ 'directory' => 'img' ] );
}
catch ( MissingFileException $e )
{
	$picture = $e->getFallbackContent();
}

$picture->print(); // Will print without versioning for files that can’t be found & won’t throw exception.

```

Changelog
---------

[](#changelog)

### 0.3.0

[](#030)

- Update to Newest Version o’ HTMLPicture

### 0.2.0

[](#020)

- Make compatible with new HTMLPicture code

### 0.1.0

[](#010)

- Initial Release

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Every ~3 days

Total

7

Last Release

2531d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/371f8a877b768ffd61b3dd2ce379630dd1fd685c3009dce955971d247ccc9521?d=identicon)[waughj](/maintainers/waughj)

---

Top Contributors

[![jjwmezun](https://avatars.githubusercontent.com/u/24711797?v=4)](https://github.com/jjwmezun "jjwmezun (1 commits)")

---

Tags

wordpressthemepicture tag

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/waughj-wp-theme-picture/health.svg)

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

###  Alternatives

[tgmpa/tgm-plugin-activation

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins).

1.8k222.5k13](/packages/tgmpa-tgm-plugin-activation)[afragen/git-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k1.6k](/packages/afragen-git-updater)[appsero/client

Appsero Client

25431.7k9](/packages/appsero-client)[proteusthemes/wp-customizer-utilities

Advanced WordPress customizer controls and settings for better user experience.

329.4k1](/packages/proteusthemes-wp-customizer-utilities)[balbuf/composer-wp

Manage WordPress core, plugins, and themes with composer.

173.6k](/packages/balbuf-composer-wp)

PHPackages © 2026

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