PHPackages                             yocmen/html-minify - 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. [Templating &amp; Views](/categories/templating)
4. /
5. yocmen/html-minify

ActiveLibrary[Templating &amp; Views](/categories/templating)

yocmen/html-minify
==================

Minifies the HTML output of Laravel 5 applications (Originally from https://github.com/fitztrev/laravel-html-minify)

v2.0.2(9y ago)1713.7k3[1 issues](https://github.com/yocmen/html-minify/issues)MITPHPPHP &gt;=5.4.0

Since Apr 14Pushed 9y ago1 watchersCompare

[ Source](https://github.com/yocmen/html-minify)[ Packagist](https://packagist.org/packages/yocmen/html-minify)[ Docs](https://github.com/yocmen/html-minify)[ RSS](/packages/yocmen-html-minify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (5)Used By (0)

Laravel 5 HTML Minify
=====================

[](#laravel-5-html-minify)

This package is originally from  i just updated the package and made it compatible with laravel 5.

About
-----

[](#about)

This package compresses the HTML output from your Laravel 5 application, seamlessly reducing the overall response size of your pages.

Other scripts that I've seen will compress the HTML output on-the-fly for each request. Instead, this package extends the Blade compiler to save the compiled template files to disk in their compressed state, reducing the overhead for each request.

Why?
----

[](#why)

Even with gzip enabled, there is still an improvement in the response size for HTML content-type documents.

Test Pagew/o Gzipw/ Gzipw/ Gzip + Laravel HTML Minify**\#1**8,039 bytes1,944 bytes**1,836 bytes** (5.6% improvement)**\#2**377,867 bytes5,247 bytes**4,314 bytes** (17.8% improvement)Installation
------------

[](#installation)

1. Add `"yocmen/html-minify": "2.*"` to **composer.json**.
2. Run `composer update`
3. Add `Yocmen\HtmlMinify\HtmlMinifyServiceProvider` to the list of providers in **config/app.php**.
4. Publish your config with `php artisan vendor:publish` command
5. **Important:** You won't see any changes until you edit your `*.blade.php` template files. Once Laravel detects a change, it will recompile them, which is when this package will go to work. To force all views to be recompiled, just run this command: `find . -name "*.blade.php" -exec touch {} \;`

### Options

[](#options)

- **`enabled`** - *boolean*, default **true**
- **`comment_stripping`** - *boolean*, default **true**

If you are using a javascript framework that conflicts with Blade's tags, you can change them.

- **`blade.rawTags`** - *array*, default `{!!` and `!!}`
- **`blade.contentTags`** - *array*, default `{{` and `}}`
- **`blade.escapedContentTags`** - *array*, default `{{{` and `}}}`

#### Skipping minification

[](#skipping-minification)

To prevent the minification of a view file, add `skipmin` somewhere in the view.

```
{{-- skipmin --}}

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

3

Last Release

3577d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11200640?v=4)[Yocsel Mendoza](/maintainers/yocmen)[@yocmen](https://github.com/yocmen)

---

Top Contributors

[![yocmen](https://avatars.githubusercontent.com/u/11200640?v=4)](https://github.com/yocmen "yocmen (6 commits)")

---

Tags

laravelperformancehtmlminifyminifierbladecompressoptimizationl5

### Embed Badge

![Health badge](/badges/yocmen-html-minify/health.svg)

```
[![Health](https://phpackages.com/badges/yocmen-html-minify/health.svg)](https://phpackages.com/packages/yocmen-html-minify)
```

###  Alternatives

[fitztrev/laravel-html-minify

Minifies the HTML output of Laravel 4 applications

414211.4k](/packages/fitztrev-laravel-html-minify)[ken/blade-minify

Laravel Blade Minify

128.9k1](/packages/ken-blade-minify)

PHPackages © 2026

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