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

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

crobays/asset
=============

Simple asset helper to get asset (image, picture, stylesheet, script) elements or urls. Images and pictures have an option to resized and/or cropped dynamically.

0.9.9(11y ago)134MITPHPPHP &gt;=5.4.0

Since Oct 29Pushed 11y ago1 watchersCompare

[ Source](https://github.com/crobays/asset)[ Packagist](https://packagist.org/packages/crobays/asset)[ RSS](/packages/crobays-asset/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (18)Used By (0)

Crobays / Asset
===============

[](#crobays--asset)

Simple asset helper to get asset (image, picture, stylesheet, script) elements or urls. Images and pictures have an option to resized and/or cropped dynamically.

#### Require

[](#require)

```
"crobays/asset": "dev-master"

```

### Usage

[](#usage)

`php artisan config:publish crobays/asset` creates a config file in your Lavavel project: `app/packages/crobays/asset/config.php`

#### Images

[](#images)

```
Asset::img('my-image.png', ['w' => 400])

```

grabs `images/my-image.png` to fit width 400px, saves it to `img/my-image___w400.png` (also create a @2x version for hi-dpi displays, you need to include retina.js to use this functionality) and returns

```

```

---

Resize and crop the image by providing both width and height

```
Asset::img('my-image.png', ['w' => 250, 'h' => 250])

```

grabs `images/my-image.png` to fit width 250px and height 250px, saves it to `img/my-image___w250-h250.png` and returns

```

```

---

Provide a size (sizes defined in `app/packages/crobays/asset/config.php`)

```
Asset::img('my-image.png', ['s' => 'xlarge'])

```

makes image and returns

```

```

---

Provide a special 100% size (defined in the `app/packages/crobays/asset/config.php`)

```
Asset::img('my-image.png', ['s' => '100%'])

```

makes image and returns

```

```

---

It allows you to add custom HTML attributes

```
Asset::img('my-image.png', ['w' => 300, 'class' => 'image'])

```

makes image and returns

```

```

---

#### Pictures

[](#pictures)

```
Asset::pic('picture.jpg', ['w' => 1440])

```

grabs `pictures/picture.jpg` to fit width 1440px, saves it to `pictures/picture___w1440.jpg` (also create a @2x version for hi-dpi displays, you need to include retina.js to use this functionality) and returns

```

```

(Inherits also all image functionalty found above)

---

#### CSS

[](#css)

(default stylesheet defined in the `app/packages/crobays/asset/config.php`)

```
Asset::css()
Asset::css('another-style.css')

```

returns

```

```

---

#### Javascript

[](#javascript)

(default script defined in the `app/packages/crobays/asset/config.php`)

```
Asset::js()
Asset::js('another-script.js')

```

returns

```

```

### Todo

[](#todo)

- phpspec tests
- codeception tests
- comment block documentation

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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

Recently: every ~16 days

Total

9

Last Release

4186d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/41409f0b2012c18abd3481b37056005f28c7e8270767a4f83148884969bf4657?d=identicon)[crobays](/maintainers/crobays)

---

Tags

weblaravel

###  Code Quality

TestsCodeception

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.5M85](/packages/unisharp-laravel-filemanager)[laravolt/avatar

Turn name, email, and any other string into initial-based avatar or gravatar.

2.0k5.8M39](/packages/laravolt-avatar)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)

PHPackages © 2026

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