PHPackages                             modularavel/laraglide - 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. modularavel/laraglide

ActiveLibrary

modularavel/laraglide
=====================

This is my package laraglide

v1.0.0(1y ago)018↓100%[1 PRs](https://github.com/modularavel/laraglide/pulls)MITPHPPHP ^8.1CI passing

Since Sep 5Pushed 1y ago2 watchersCompare

[ Source](https://github.com/modularavel/laraglide)[ Packagist](https://packagist.org/packages/modularavel/laraglide)[ Docs](https://github.com/modularavel/laraglide)[ RSS](/packages/modularavel-laraglide/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (3)Used By (0)

This is my package laraglide
============================

[](#this-is-my-package-laraglide)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2595fafbbfceab3394f623596c40074ddc7345b27b9459d5319279bb612e99ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f64756c61726176656c2f6c617261676c6964652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/modularavel/laraglide)[![GitHub Tests Action Status](https://camo.githubusercontent.com/cea1b35d4731718eb05e8a9dad75939959ff041ae9c4731c0b2a5ec53ec6ef65/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6f64756c61726176656c2f6c617261676c6964652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/modularavel/laraglide/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/99add3f22560b9e2dc196c3223a060dd5b2b02814b6a26ba14d993832b1f6f58/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6f64756c61726176656c2f6c617261676c6964652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/modularavel/laraglide/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/59ad816d3df830a58e801c6dad809e0c3afa49eb4fb3543a15e2ee97aebfa829/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f64756c61726176656c2f6c617261676c6964652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/modularavel/laraglide)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Support us
----------

[](#support-us)

[![](https://github.com/modularavel/laraglide/raw/develop/prints/print_01.png?t=1)](https://github.com/modularavel/laraglide/blob/develop/prints/print_01.png?t=1)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

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

[](#installation)

You can install the package via composer:

```
composer require modularavel/laraglide
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laraglide-config"
```

This is the contents of the published config file:

```
return [
    'base_url' => env('LARAGLIDE_BASE_URL', 'img'),

    'max_image_size' => env('LARAGLIDE_MAX_IMAGE_SIZE', 1024 * 1024 * 2),

    /*
    |--------------------------------------------------------------------------
    | Image driver
    |--------------------------------------------------------------------------
    |
    | By default Glide uses the GD library.
    | However, you can also use Glide with ImageMagic if
    | The Imagick PHP extension is installed.
    |
    | Supported drivers: "gd", "imagik"
    |
    */
    'driver' => env('LARAGLIDE_DRIVER', 'gd'),

    'source_driver' => env('LARAGLIDE_SOURCE_DRIVER', 'local'),

    'cache_driver' => env('LARAGLIDE_CACHE_DRIVER', 'local'),

    'cache_path_prefix' => env('LARAGLIDE_CACHE_PATH_PREFIX', '.cache'),

    'group_cache_in_folders' => env('LARAGLIDE_GROUP_CACHE_IN_FOLDERS', '.cache'),

    'watermarks_path' => public_path('watermarks/'),

    'img_params' => [
        /*
        |--------------------------------------------------------------------------
        | Orientation (or)
        |--------------------------------------------------------------------------
        |
        | Rotates the image. Accepts auto, 0, 90, 180 or 270. Default is auto.
        | The auto option uses Exif data to automatically orient images correctly.
        |
        |
        |
        */
        'or' => env('LARAGLIDE_IMG_OR', 90),

        /*
        |--------------------------------------------------------------------------
        | Orientation (or)
        |--------------------------------------------------------------------------
        |
        | You can also set where the image is cropped by adding a crop position.
        | Accepts crop-top-left, crop-top, crop-top-right, crop-left, crop-center,
        | crop-right, crop-bottom-left, crop-bottom or crop-bottom-right.
        |
        | Default is crop-center, and is the same as crop.
        |
        |
        |
        | In addition to the crop position, you can be more specific about the exact
        | crop position using a focal point. This is defined using two offset
        |  percentages: crop-x%-y%.
        |
        |
        |
        */
        'fit' => env('LARAGLIDE_IMG_FIT', 'crop'),

        // Flips the image. Accepts v, h and both.
        'flip' => env('LARAGLIDE_IMG_FLIP', ''),

        'width' => env('LARAGLIDE_IMG_WIDTH', 400),

        'height' => env('LARAGLIDE_IMG_HEIGHT', 600),

        'ratio' => env('LARAGLIDE_IMG_RATIO', 0.5),

        /*
        | The device pixel ratio is used to easily convert between CSS pixels
        | and device pixels. This makes it possible to display images at the
        | correct pixel density on a variety of devices such as Apple devices
        | with Retina Displays and Android devices.
        | You must specify either a width, a height, or both for this
        | parameter to work. The default is 1.
        | The maximum value that can be set for dpr is 8.
        |
        |
        |
        */
        'pixel' => env('LARAGLIDE_IMG_PIXEL', 0),

        'blur' => env('LARAGLIDE_IMG_BLUR', 0),

        'borderSize' => env('LARAGLIDE_IMG_BORDER_SIZE', 7),

        'borderColor' => env('LARAGLIDE_IMG_BORDER_COLOR', 'FFCC33'),

        /*
        |--------------------------------------------------------------------------
        | Border
        |--------------------------------------------------------------------------
        |
        | Add a border to the image. Required format: width,color,method.
        | Default is crop-center, and is the same as crop.
        |
        |
        |
        | Sets how the border will be displayed. Available options:
        |
        | (overlay):  Place border on top of image (default)
        | (shrink):   Shrink image within border (canvas does not change).
        | (expand):   Expands canvas to accommodate border.
        |
        |
        |
        */
        'borderType' => env('LARAGLIDE_IMG_BORDER_TYPE', 'expand'),

        'quality' => env('LARAGLIDE_IMG_QUALITY', 90), // Integer: 0 - 100

        /*
        |--------------------------------------------------------------------------
        | Gamma (gam)
        |--------------------------------------------------------------------------
        |
        | Adjusts the image gamma. Use values between 0.1 and 9.99.
        |
        |
        |
        */
        'gama' => 0.9,

        /*
        |--------------------------------------------------------------------------
        | Format (fm)
        |--------------------------------------------------------------------------
        |
        | Encodes the image to a specific format. Accepts jpg, pjpg (progressive jpeg)
        | png, gif, webp or avif. Defaults to jpg.
        |
        |
        |
        */
        'encodeFormat' => 'webp',

        /*
        |--------------------------------------------------------------------------
        | Contrast (con)
        |--------------------------------------------------------------------------
        |
        | Adjusts the image contrast. Use values between -100 and +100,
        | where 0 represents no change.
        |
        */
        'contrast' => 3,

        /*
        |--------------------------------------------------------------------------
        | Brightness (bri)
        |--------------------------------------------------------------------------
        |
        | Adjusts the image brightness. Use values between -100 and +100,
        | where 0 represents no change.
        |
        */
        'brightness' => -2,

        /*
        |--------------------------------------------------------------------------
        | Background (bg)
        |--------------------------------------------------------------------------
        |
        | Sets the background color of the image. See colors for more information
        | on the available color formats.
        |
        |
        |
        */
        'bg' => 'black',

        /*
        |--------------------------------------------------------------------------
        | Sharpen (sharp)
        |--------------------------------------------------------------------------
        |
        | Sharpen the image. Use values between 0 and 100.
        |
        |
        |
        */
        'sharp' => 3,

        /*
        |--------------------------------------------------------------------------
        | Loading (lazy)
        |--------------------------------------------------------------------------
        */
        'loading' => 'lazy',
    ],

    /*
    |--------------------------------------------------------------------------
    | Image driver
    |--------------------------------------------------------------------------
    |
    | In certain situations you may want to define default image manipulations.
    | For example, maybe you want to specify that all images are outputted
    | as JPEGs (fm=jpg). Or maybe you have a watermark that you want added to
    | all images. Glide makes this possible using default manipulations.
    |
    */
    'defaults' => [
        'mark' => 'logo.png',

        'markw' => '30w', // Sets the width of the watermark in pixels, or using relative dimensions.

        'markh' => '200', // Sets the height of the watermark in pixels, or using relative dimensions.

        'markpad' => '5w', /* Padding, sets how far the watermark is away from the edges of the image.
                            | Basically a shortcut for using both markx and marky.
                            | Set in pixels, or using relative dimensions.
                            | Ignored if markpos is set to center.
                            */
    ],

    /*
    |--------------------------------------------------------------------------
    | Presets
    |--------------------------------------------------------------------------
    |
    | Glide also makes it possible to define groups of defaults, known as
    | presets! This is helpful if you have standard image manipulations
    | that you use throughout your app.
    |
    | Using presets: "To use a presets, set it using the p parameter:"
    |
    |
    | It’s also possible to use multiple presets together:
    |
    |
    | It’s even possible to use presets with additional parameters:
    |
    */
    'presets' => [
        'small' => [
            'w' => 200,
            'h' => 200,
            'fit' => 'crop',
        ],
        'medium' => [
            'w' => 600,
            'h' => 400,
            'fit' => 'crop',
        ],
    ],
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="laraglide-views"
```

Blade component

```
@props([
    'src',
    'alt',
    ...config('laraglide.img_params')
])

```

Usage
-----

[](#usage)

```

```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Casimiro Rocha](https://github.com/modularavel)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance49

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80.8% 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

Unknown

Total

1

Last Release

376d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7354fd72dfef31d8a9afddab61122ab6ade014057993e0c05b1f7e0d95343742?d=identicon)[modularavel](/maintainers/modularavel)

---

Top Contributors

[![casimirorocha](https://avatars.githubusercontent.com/u/6707152?v=4)](https://github.com/casimirorocha "casimirorocha (21 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![modularavel](https://avatars.githubusercontent.com/u/149928614?v=4)](https://github.com/modularavel "modularavel (1 commits)")

---

Tags

laravelmodularavellaraglide

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/modularavel-laraglide/health.svg)

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

###  Alternatives

[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[basillangevin/laravel-data-json-schemas

Transforms Spatie Data objects into JSON Schemas with built-in validation

1312.2k1](/packages/basillangevin-laravel-data-json-schemas)

PHPackages © 2026

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