Download the PHP package sirv/sirv-image without Composer

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

Sirv Image Transformation - PHP

A fluent URL builder for Sirv dynamic image transformations. Build transformed image URLs with an intuitive, chainable API — no API credentials required.

Installation

Quick Start

Constructor

API Reference

All methods return $this for chaining. Call ->toUrl() to get the final URL. Casting to string also works.

Resize

Method Parameters Description
resize($width, $height, $option) int\|null, int\|null, string\|null Resize with optional scale option
width($w) int Set width
height($h) int Set height
scaleByLongest($s) int Resize by longest dimension
thumbnail($size = 256) int Create square thumbnail

Crop

Method Parameters Description
crop($w, $h, $x, $y, $type, $padW, $padH) all nullable Crop image
clipPath($name) string Apply clipping path

Rotation

Method Description
rotate($degrees) Rotate (-180 to 180)
flip() Flip vertically
flop() Flip horizontally

Format & Quality

Method Parameters Description
format($fmt) string Output format
quality($q) int JPEG quality (0-100)
webpFallback($fmt) string WebP fallback
subsampling($value) string Chroma subsampling
pngOptimize($enabled = true) bool PNG optimization
gifLossy($level) int GIF lossy compression

Color Adjustments

brightness($v), contrast($v), exposure($v), hue($v), saturation($v), lightness($v), shadows($v), highlights($v) — all accept int (-100 to 100).

grayscale(), colorLevel($black, $white), histogram($channel)

Color Effects

Method Parameters Description
colorize($color, $opacity) string, int Color overlay
colortone($preset) string Preset colortone
colortone(null, $options) array Custom colortone with color, level, mode

Effects

blur($v), sharpen($v), vignette($value, $color), opacity($v)

Text Overlay

Watermark

Canvas & Frame

Other

Method Description
page($num) PDF page
profile($name) Saved profile

Examples

E-commerce Product

Vintage Effect

Testing

License

MIT


All versions of sirv-image with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 sirv/sirv-image contains the following files

Loading the files please wait ...