PHPackages                             netnak/minimatic - 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. netnak/minimatic

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

netnak/minimatic
================

v1.0.8(1mo ago)0157[1 issues](https://github.com/netnak/minimatic/issues)MITPHPPHP ^8.2

Since Jun 6Pushed 1mo agoCompare

[ Source](https://github.com/netnak/minimatic)[ Packagist](https://packagist.org/packages/netnak/minimatic)[ RSS](/packages/netnak-minimatic/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (6)Versions (10)Used By (0)

Minimatic
=========

[](#minimatic)

> **Minimatic** is a Statamic addon that minifies HTML responses and/or static cached pages using [`voku/html-min`](https://github.com/voku/HtmlMin).

---

🚀 Features
----------

[](#-features)

Minimatic wraps the powerful `HtmlMin` engine and exposes its configuration through a publishable config file. You can toggle the following features:

- `doOptimizeViaHtmlDomParser()` – optimize HTML using the DOM parser
- `doRemoveComments()` – remove HTML comments
- `doSumUpWhitespace()` – collapse excess whitespace
- `doRemoveWhitespaceAroundTags()` – trim whitespace around tags
- `doOptimizeAttributes()` – optimize HTML attributes
- `doRemoveHttpPrefixFromAttributes()` – strip `http:` from attributes
- `doRemoveHttpsPrefixFromAttributes()` – strip `https:` from attributes
- `doKeepHttpAndHttpsPrefixOnExternalAttributes()` – preserve prefixes for external links
- `doMakeSameDomainsLinksRelative(['example.com'])` – make internal links relative
- `doRemoveDefaultAttributes()` – remove default attribute values
- `doRemoveDeprecatedAnchorName()` – remove deprecated anchor name attributes
- `doRemoveDeprecatedScriptCharsetAttribute()` – remove charset from `` tags
- `doRemoveDeprecatedTypeFromScriptTag()` – remove deprecated type from ``
- `doRemoveDeprecatedTypeFromStylesheetLink()` – remove `type="text/css"` from CSS links
- `doRemoveDeprecatedTypeFromStyleAndLinkTag()` – remove `type="text/css"` globally
- `doRemoveDefaultMediaTypeFromStyleAndLinkTag()` – remove `media="all"`
- `doRemoveDefaultTypeFromButton()` – remove `type="submit"` from buttons
- `doRemoveEmptyAttributes()` – strip empty attributes
- `doRemoveValueFromEmptyInput()` – remove `value=""` from empty inputs
- `doSortCssClassNames()` – sort class names for better Gzip performance
- `doSortHtmlAttributes()` – sort attributes for better Gzip performance
- `doRemoveSpacesBetweenTags()` – aggressively trim inter-tag spaces
- `doRemoveOmittedQuotes()` – omit unnecessary attribute quotes
- `doRemoveOmittedHtmlTags()` – omit redundant HTML tags

---

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require netnak/minimatic
```

Then publish the config file (optional):

```
php artisan vendor:publish --tag=minimatic-config --force
```

---

⚙️ Configuration
----------------

[](#️-configuration)

Minimatic auto-registers its own replacer at runtime.

However, if you want to manually ensure it's added as a static caching replacer, edit `config/statamic/static_caching.php`:

```
'replacers' => [
    // ...
    \Netnak\Minimatic\Replacers\MinimaticReplacer::class,
],
```

---

✅ Usage
-------

[](#-usage)

Enable minification via your `.env` file:

```
MINIFY_RESPONSE=true
MINIFY_STATIC=true
```

These values toggle options in `config/minimatic.php`:

```
'enable_response_minifier' => env('MINIFY_RESPONSE', false),
'enable_static_cache_replacer' => env('MINIFY_STATIC', false),
```

Exclude paths from minification with:

```
'ignored_paths' => ['!/*', 'api/*'],
```

---

🪪 License
---------

[](#-license)

MIT — see the [LICENSE](LICENSE) file for details.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance89

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

Recently: every ~83 days

Total

9

Last Release

57d ago

Major Versions

v1.0.5 → v6.x-dev2026-05-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/b8d9639d2634adc916f3395d3c3af3fe6038f077f5c0f4098857e6da47504efb?d=identicon)[netnak](/maintainers/netnak)

---

Top Contributors

[![netnakgraham](https://avatars.githubusercontent.com/u/20700065?v=4)](https://github.com/netnakgraham "netnakgraham (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/netnak-minimatic/health.svg)

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

###  Alternatives

[statamic/seo-pro

68516.6k](/packages/statamic-seo-pro)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[rias/statamic-redirect

29335.6k](/packages/rias-statamic-redirect)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.9k](/packages/duncanmcclean-statamic-cargo)[jacksleight/statamic-bard-texstyle

18195.4k](/packages/jacksleight-statamic-bard-texstyle)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

23111.5k15](/packages/marcorieser-statamic-livewire)

PHPackages © 2026

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