PHPackages                             waughj/wp-upload-image - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. waughj/wp-upload-image

ActiveLibrary[File &amp; Storage](/categories/file-storage)

waughj/wp-upload-image
======================

Class for autogenerating HTML for WordPress media image with just the ID.

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

Since May 13Pushed 6y agoCompare

[ Source](https://github.com/waughjai/wp-upload-image)[ Packagist](https://packagist.org/packages/waughj/wp-upload-image)[ RSS](/packages/waughj-wp-upload-image/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (4)Versions (14)Used By (3)

WP Upload Image
===============

[](#wp-upload-image)

Class for autogenerating HTML for WordPress media image with just the ID.

Just pass in ID &amp; WordPress will automatically generate HTMLImage object based on ID in media. If no item with the given ID is in media database, then it just creates an empty HTMLImage object.

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

[](#error-handling)

Like HTMLImage, if “show-version” is set on ( the default ) &amp; the server can’t access the file to get its version information, the constructor will throw a MissingFileException that includes fallback content that is the equivalent o’ the object with “show-version” set off &amp; a list o’ missing files. Read HTMLImage’s documentation for mo’ information.

If WordPress can’t find the media ID in its media database, then the constructor will throw a WPMissingMediaException, which keeps a list o’ IDs passed into it ’pon construction, which can be reached through its getMissingIDs() method.

Changelog
---------

[](#changelog)

### 0.5.3

[](#053)

- Update TestHashItem dependency

### 0.5.2

[](#052)

- Fix URL problems with date-based URLs

### 0.5.1

[](#051)

- Make absoluteToLocal method public so WPUploadPicture can use it

### 0.5.0

[](#050)

- Integrate HTMLImages sizes autogeneration &amp; shorthand format

### 0.4.1

[](#041)

- Fix Error Handling Bugs for Responsive Images

### 0.4.0

[](#040)

- Add Error-handling for missing media ID

### 0.3.0

[](#030)

- Update error handling.

### 0.2.2

[](#022)

- Make getFormattedURL Method Parameters Less Asinine

### 0.2.1

[](#021)

- Make getFormattedURL Method Public So WPUploadPicture Can Access It

### 0.2.0

[](#020)

- Implement versioning for fixing cache poisoning

### 0.1.2

[](#012)

- Fix WordPress Uploads Compatibility Bug

### 0.1.1

[](#011)

- Fix Inaccurate Base URL

### 0.1.0

[](#010)

- Initial version

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

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 ~2 days

Total

13

Last Release

2536d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

wordpressmedia image

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/waughj-wp-upload-image/health.svg)

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

###  Alternatives

[humanmade/network-media-library

Network Media Library provides a central media library that's shared across all sites on the Multisite network.

29644.8k](/packages/humanmade-network-media-library)[ilab/ilab-media-tools

Tools for cropping, uploading to S3, serving through Imgix

119102.7k1](/packages/ilab-ilab-media-tools)[wptt/webfont-loader

Locally host webfonts.

12651.7k2](/packages/wptt-webfont-loader)[dre1080/wp-graphql-upload

Adds file upload support to the WP GraphQL Plugin.

3854.0k](/packages/dre1080-wp-graphql-upload)[mcguffin/acf-dropzone

Drag and drop file upload for ACF-Fields.

339.2k](/packages/mcguffin-acf-dropzone)

PHPackages © 2026

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