PHPackages                             sympress/assets - 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. sympress/assets

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

sympress/assets
===============

WordPress asset management library with optional Symfony-kernel integration.

1.0.1(1mo ago)1110GPL-2.0-or-laterPHPPHP ^8.5CI passing

Since Jun 14Pushed 1w agoCompare

[ Source](https://github.com/SymPress/assets)[ Packagist](https://packagist.org/packages/sympress/assets)[ RSS](/packages/sympress-assets/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (12)Versions (3)Used By (0)

SymPress Assets
===============

[](#sympress-assets)

[![Checks](https://camo.githubusercontent.com/5c909654f9feb009185ad8f7ce49209bafa011752cd1595863fbe9d818895755/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f53796d50726573732f6173736574732f71612e796d6c3f6272616e63683d6d61696e266c6162656c3d636865636b73)](https://github.com/SymPress/assets/actions/workflows/qa.yml) [![Release](https://camo.githubusercontent.com/c23f67af2893e63992745a96ed6976feef9622599025a4a77e5635f0a5f2085c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f53796d50726573732f6173736574733f6c6162656c3d72656c65617365)](https://github.com/SymPress/assets/releases) [![PHP](https://camo.githubusercontent.com/ffaccfbcf7d9bfd7c0cc1194dcca263246cffaf0879de8bd73d3c6e0f6d7710c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f73796d70726573732f6173736574732f7068702e7376673f6c6162656c3d706870)](https://packagist.org/packages/sympress/assets) [![Downloads](https://camo.githubusercontent.com/9b37c747add7ed997a4370889e0aa498ac537eeafbb894051a9224d2d28a67dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796d70726573732f6173736574732e7376673f6c6162656c3d646f776e6c6f616473)](https://packagist.org/packages/sympress/assets/stats) [![License: GPL-2.0-or-later](https://camo.githubusercontent.com/26f8b6541ea045cc1dbc2267208158b5a7ebbf5cf437c4b486d80fee9386f77e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d2d322e302d2d6f722d2d6c617465722d626c75652e737667)](LICENSE)

Asset management for SymPress WordPress packages, plugins, and themes.

The package registers classic scripts, script modules, and styles through a Composer library. It can run standalone in WordPress or through the optional Symfony kernel integration.

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

[](#installation)

```
composer require sympress/assets
```

Features
--------

[](#features)

- Scripts, script modules, and styles with one shared asset API
- Webpack manifest, Encore, array, and PHP file loaders
- Automatic versions from file paths or dependency extraction files
- Native script loading strategies: `defer`, `async`, `blocking`
- Style preload for non-critical CSS
- Resource hints for `preload`, `preconnect`, and `dns-prefetch`
- Protection from cache, minify, combine, defer, and delay optimizations
- Optional Symfony kernel integration with asset providers

Example
-------

[](#example)

```
