Download the PHP package jcfrane/laravel-lens without Composer

On this page you can find all versions of the php package jcfrane/laravel-lens. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-lens

Laravel Lens

Latest Version on Packagist GitHub Tests Action Status Total Downloads License

Configuration-driven image manipulation and caching for Laravel, inspired by Symfony's LiipImagineBundle.

Define named filter sets in your config, and Laravel Lens handles the rest — lazy processing on first request, automatic caching, and simple Blade integration. Built on top of Intervention Image and Laravel's filesystem abstraction, it works with any storage driver out of the box.

Quick Examples

Define filter sets in your config:

Use them anywhere in your application:

Features

Requirements

Installation

Publish the configuration file:

Configuration

The published config file (config/lens.php) contains all settings:

Driver

Data Loader

Configure where source images are loaded from. Uses Laravel filesystem disks:

Cache

Configure where processed images are stored:

Stampede Protection

When a popular image is requested before its variant is cached, many concurrent requests can each decode the full-size source into memory. Enable the lock so only one request runs the pipeline while the rest wait for the cached result:

Requires a cache store that supports atomic locks (redis, memcached, database, file, array, dynamodb).

Filter Sets

Each filter set defines an ordered pipeline of filters:

Routes

Usage

Blade Directive

Blade Component

The component renders an <img> tag with the filtered image URL and passes through any additional HTML attributes.

Facade

Runtime Filter Overrides

Override filter options at call time without creating a new filter set:

API Route

The package auto-registers a route for on-demand image processing:

On the first request, the image is processed through the filter pipeline and cached. Subsequent requests are served from cache with a redirect.

Example: /lens/thumbnail_small/photos/landscape.jpg

Available Filters

Filter Options Description
auto_orient — Rotate based on EXIF orientation data
thumbnail size, mode, upscale Scale and/or crop to thumbnail dimensions
crop size, start Crop a rectangular region
resize size Resize to exact dimensions
scale size Scale proportionally
watermark image, position, opacity, size Overlay a watermark image
grayscale — Convert to grayscale
flip direction Mirror horizontally or vertically
rotate angle, background Rotate by degrees
blur amount Apply Gaussian blur
brightness level Adjust brightness (-100 to 100)
contrast level Adjust contrast (-100 to 100)
background color, size, position Set or extend canvas with background color
strip — Remove animation frames

Custom Filters

Create a class implementing FilterInterface:

Register it in a service provider:

Then use it in your filter sets:

Artisan Commands

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please use the issue tracker.

Credits

Acknowledgments

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-lens with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
intervention/image Version ^3.0
illuminate/support Version ^12.0|^13.0
illuminate/filesystem Version ^12.0|^13.0
illuminate/routing Version ^12.0|^13.0
illuminate/cache Version ^12.0|^13.0
illuminate/console Version ^12.0|^13.0
illuminate/view Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jcfrane/laravel-lens contains the following files

Loading the files please wait ...