PHPackages                             phpnomad/asset - 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. phpnomad/asset

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

phpnomad/asset
==============

1.0.1(3w ago)03.9k[1 PRs](https://github.com/phpnomad/asset/pulls)2MITPHPCI passing

Since Jan 26Pushed 3w ago2 watchersCompare

[ Source](https://github.com/phpnomad/asset)[ Packagist](https://packagist.org/packages/phpnomad/asset)[ Docs](https://github.com/phoenix/core)[ RSS](/packages/phpnomad-asset/feed)WikiDiscussions main Synced today

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

phpnomad/asset
==============

[](#phpnomadasset)

[![Latest Version](https://camo.githubusercontent.com/46850aa2964361441759b7f73e2ef8a3a1a70af133f0ad044f955a36c4557277/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068706e6f6d61642f61737365742e737667)](https://packagist.org/packages/phpnomad/asset)[![Total Downloads](https://camo.githubusercontent.com/2efc536b8c7d7b12232983764382107b1bb687b0a04d47bb8485ce23dd9b1311/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068706e6f6d61642f61737365742e737667)](https://packagist.org/packages/phpnomad/asset)[![PHP Version](https://camo.githubusercontent.com/26076d6e6dd00edfc2eee19cb1bcad40bc44c9154aa570c5d236204bc53cb27a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7068706e6f6d61642f61737365742e737667)](https://packagist.org/packages/phpnomad/asset)[![License](https://camo.githubusercontent.com/f0bfc84519f69ebb849bad85606f4f684f2dec44066d76ba9280bd6b5387c3f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7068706e6f6d61642f61737365742e737667)](https://packagist.org/packages/phpnomad/asset)

`phpnomad/asset` defines the contract PHPNomad applications use to turn asset file paths into public URLs. The URL for a CSS file, an image, or a JavaScript bundle depends on where the code runs. A WordPress plugin, a Laravel app, and a standalone PHP service all publish assets under different prefixes. This package provides a single interface so the rest of your code can ask for an asset URL without caring which host is serving it.

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

[](#installation)

```
composer require phpnomad/asset
```

Overview
--------

[](#overview)

- `PHPNomad\Asset\Interfaces\AssetStrategy` is the only interface in the package. It has two methods.
- `getUrlForAbsoluteAsset(string $file)` takes the absolute filesystem path to an asset and returns its public URL.
- `getUrlForRelativeAsset(string $file, string $relativeTo)` resolves a path relative to another file (usually `__FILE__` from the caller) and returns the URL for the resulting asset.
- Implementations live in host-specific integrations. The WordPress integration converts plugin paths through `plugin_dir_url()`. A standalone implementation strips a known public directory and joins the app URL.
- Swapping implementations lets the same asset-loading code move between hosts without changes.

Documentation
-------------

[](#documentation)

Full documentation lives at [phpnomad.com](https://phpnomad.com).

License
-------

[](#license)

Released under the MIT License. See [LICENSE.txt](LICENSE.txt).

###  Health Score

47

↑

FairBetter than 93% of packages

Maintenance95

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.7% 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 ~540 days

Total

2

Last Release

21d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e6206223bd6f2a57b8ac80605b1b5c3521faaec18ad3f20f25fb728a9a13784?d=identicon)[tstandiford](/maintainers/tstandiford)

---

Top Contributors

[![alexstandiford](https://avatars.githubusercontent.com/u/8210827?v=4)](https://github.com/alexstandiford "alexstandiford (8 commits)")[![malayladu](https://avatars.githubusercontent.com/u/708174?v=4)](https://github.com/malayladu "malayladu (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

assetsframeworkphpphpnomadplatform-agnosticstatic-files

### Embed Badge

![Health badge](/badges/phpnomad-asset/health.svg)

```
[![Health](https://phpackages.com/badges/phpnomad-asset/health.svg)](https://phpackages.com/packages/phpnomad-asset)
```

###  Alternatives

[maurymmarques/minify-cakephp

A CakePHP plugin that facilitates the use of PHP Minify with CakePHP

591.3k](/packages/maurymmarques-minify-cakephp)

PHPackages © 2026

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