PHPackages                             nicklog/imgproxy - 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. [Image &amp; Media](/categories/media)
4. /
5. nicklog/imgproxy

ActiveLibrary[Image &amp; Media](/categories/media)

nicklog/imgproxy
================

This library provides a simple way to generate URLs for imgproxy.

1.0.0(1y ago)0141MITPHPPHP ^8.3

Since Dec 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nicklog/imgproxy)[ Packagist](https://packagist.org/packages/nicklog/imgproxy)[ Docs](https://github.com/nicklog/imgproxy)[ GitHub Sponsors](http://github.com/sponsors/nicklog)[ Fund](https://liberapay.com/nicklog)[ RSS](/packages/nicklog-imgproxy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (9)Versions (2)Used By (0)

### ImgProxy

[](#imgproxy)

This is a PHP library that makes it easy to build URL for [ImgProxy](https://imgproxy.net).

[![Version](https://camo.githubusercontent.com/0ce063c8a69b72f6580eb87f12ae03a727ffcb55aa0364bbacb747c32bbbb72d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e69636b6c6f672f696d6770726f78792e737667)](https://packagist.org/packages/nicklog/imgproxy)[![Php](https://camo.githubusercontent.com/d8f6bbc3f3a9ec803698fb91ddba288c6c02def6c24c019df2eb06229c804a3c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6e69636b6c6f672f696d6770726f78792e737667)](https://www.php.net/)[![License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)[![Build Status](https://github.com/nicklog/imgproxy/actions/workflows/test.yml/badge.svg)](https://github.com/nicklog/imgproxy/actions?workflow=test)[![Latest Stable Version](https://camo.githubusercontent.com/3d0dd424ac49dd04f51c944f99f2db1831dca0035a06343b7f7ce81de154277d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e69636b6c6f672f696d6770726f78792e7376673f6c6162656c3d737461626c65)](https://packagist.org/packages/nicklog/imgproxy)[![Latest Unstable Version](https://camo.githubusercontent.com/ac7d4bba3fd4a1cf92ef244efb899c122a3a743a0d73bf5fbc4fa58f8d141577/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e69636b6c6f672f696d6770726f78792e7376673f6c6162656c3d756e737461626c65)](https://packagist.org/packages/nicklog/imgproxy)[![Total Downloads](https://camo.githubusercontent.com/450e4da7523976adf02ebc494b35a768f9599408950bd76ce1d45d2ee7216166/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e69636b6c6f672f696d6770726f78792e737667)](https://packagist.org/packages/nicklog/imgproxy)[![Monthly Downloads](https://camo.githubusercontent.com/47ca07351822f02d35a199d3ccf9a1d0e2420cbfdc17ba5915395f9a9fc51bc5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6e69636b6c6f672f696d6770726f78792e737667)](https://packagist.org/packages/nicklog/imgproxy)[![Daily Downloads](https://camo.githubusercontent.com/4d1ccb0fdf720039b0d5c6dfe0c6efe7cac3e5225eae8c30fe4ccd608b8e71f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64642f6e69636b6c6f672f696d6770726f78792e737667)](https://packagist.org/packages/nicklog/imgproxy)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require nicklog/imgproxy:^1.0

```

or add this code line to the `require` section of your `composer.json` file:

```
"nicklog/imgproxy": "^1.0"

```

Usage
-----

[](#usage)

```
use NickLog\ImgProxy\ImgProxy;
use NickLog\ImgProxy\Signer\KeyPair;
use NickLog\ImgProxy\Options\Dpr;
use NickLog\ImgProxy\Options\Quality;
use NickLog\ImgProxy\Options\Width;
use NickLog\ImgProxy\Options\Height;

$imgProxyBaseUrl = 'https://imgproxy.example.com';
$key = getenv('IMGPROXY_KEY');
$salt = getenv('IMGPROXY_SALT');

$src = 'http://example.com/image.jpg';

$signer = new KeyPair($key, $salt);
$imgProxy = new ImgProxy($imgProxyBaseUrl, $signer);

$builder = $imgProxy->urlBuilder($src);
$builder = $builder->with(
    new Dpr(2),
    new Quality(90),
    new Width(300),
    new Height(400)
);

$url = $builder->build()->__toString();  // encoded url
$url = $builder->encoded(false)->build()->__toString(); // plain url

# example: /9SaGqJILqstFsWthdP/dpr:2/q:90/w:300/h:400/aHR0cDovL2V4YW1w/bGUuY29tL2ltYWdl/LmpwZw
```

License
-------

[](#license)

Released under the [MIT license](LICENSE).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance40

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

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

505d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa5022bc04220e19fd14f86fd9db50a3a1ddc1808cc282f79ffe0fff181359c8?d=identicon)[Nicklog](/maintainers/Nicklog)

---

Top Contributors

[![nicklog](https://avatars.githubusercontent.com/u/462920?v=4)](https://github.com/nicklog "nicklog (8 commits)")

---

Tags

urlimagegeneratorresizecroprotateFitfillimgproxy

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nicklog-imgproxy/health.svg)

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

###  Alternatives

[sybio/image-workshop

Powerful PHP class using GD library to work easily with images including layer notion (like Photoshop or GIMP)

860918.1k11](/packages/sybio-image-workshop)[masterexploder/phpthumb

A library for manipulating images in PHP.

981751.7k17](/packages/masterexploder-phpthumb)[ctessier/nova-advanced-image-field

An advanced image field for Nova with cropping and resizing.

103548.4k1](/packages/ctessier-nova-advanced-image-field)[jbzoo/image

A PHP class that simplifies working with images

171126.9k3](/packages/jbzoo-image)[stefangabos/zebra_image

A single-file, lightweight PHP library designed for efficient image manipulation featuring methods for modifying images and applying filters

141110.4k6](/packages/stefangabos-zebra-image)[crocodile2u/imgproxy-php

URL generator for darthsim/imgproxy

39141.3k](/packages/crocodile2u-imgproxy-php)

PHPackages © 2026

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