Download the PHP package hosmelq/laravel-imgproxy without Composer

On this page you can find all versions of the php package hosmelq/laravel-imgproxy. 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-imgproxy

Laravel imgproxy

Build imgproxy URLs in Laravel with optional encryption and signing.

Requirements

Installation

Install Laravel imgproxy with Composer:

Set IMGPROXY_BASE_URL to the root URL of the imgproxy server. Set IMGPROXY_KEY and IMGPROXY_SALT to the hex-encoded key and salt the server uses to check signatures.

Without a key and salt, URLs are built with insecure in place of a signature. Sources are Base64-encoded by default. Signing and Base64 sources work with any imgproxy server.

Build URLs

Start a builder with the Imgproxy facade, add processing options, and pass the source URL to build():

The imgproxy() helper returns the same builder:

Each call starts a fresh builder from the package configuration. Options appear in the URL in the order they are added. See hosmelq/imgproxy for every processing option.

format() sets the output format option without changing the URL's extension. Pass an extension to build() to append one:

Build URLs from disks

Call imgproxy() on a filesystem disk to use a file's URL as the source:

Builder options chain directly from the disk. build() takes no source URL, so its first argument is the output extension.

Use temporary() when the source should be a temporary URL from the disk:

temporary() also accepts the disk's temporary URL options as its second argument. The expiration applies to the source URL only. Add expires() with a Unix timestamp when the imgproxy URL should expire too.

Read image information

Image-info URLs require imgproxy Pro. Start one with Imgproxy::infoBuilder(), or with imgproxyInfo() on a disk:

Image-info URLs are signed and encoded the same way as processing URLs. They do not accept an output extension.

Encrypt source URLs

Source encryption requires imgproxy Pro. Set IMGPROXY_SOURCE_ENCODING to encrypted and IMGPROXY_ENCRYPTION_KEY to the hex-encoded key the server uses. The key must decode to 16, 24, or 32 bytes.

By default, the IV is derived from the source URL and the key, so the same source always produces the same URL.

Call Imgproxy::buildIvUsing() from a service provider to generate the IV with a custom callback:

The callback receives the source URL, must return exactly 16 bytes, and applies to processing and image-info URLs. Pass null to restore the default. Keep the IV deterministic: a random IV produces a different URL on every build, which defeats caching. The example derives the IV from APP_KEY, so rotating that key changes every encrypted URL it generates.

Configuration

Publish the configuration file:

The configuration file also covers the arguments separator, signature size, short option names, presets-only mode, option aliases, source chunking, source filenames, and trusted signatures, each with its environment variable where one exists. Image-info URLs use info_only_presets and info_option_aliases in place of only_presets and option_aliases, and share every other setting.

Creating a builder throws an InvalidArgumentException when the base URL is missing, the source encoding is unknown, encrypted sources have no encryption key, or an option alias names an unknown option.

Use dependency injection

Inject ImgproxyManager when a class should not depend on the facade:

Deploy imgproxy

Deploy a ready-to-run imgproxy server with the Railway template:

Deploy on Railway

Development

Run the test suite with:

Changelog

See CHANGELOG.md for a list of changes.

Contributing

Pull requests are welcome. Please run the test suite before submitting changes.

License

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


All versions of laravel-imgproxy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
hosmelq/imgproxy Version ^2.0
illuminate/filesystem Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
spatie/laravel-package-tools Version ^1.93
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 hosmelq/laravel-imgproxy contains the following files

Loading the files please wait ...