PHPackages                             astrotomic/php-weserv-images - 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. astrotomic/php-weserv-images

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

astrotomic/php-weserv-images
============================

A fluent URL generator for images.weserv.nl

1.1.0(2y ago)72.2k3[1 PRs](https://github.com/Astrotomic/php-weserv-images/pulls)1MITPHPPHP ^7.4|^8.0CI passing

Since Feb 28Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/Astrotomic/php-weserv-images)[ Packagist](https://packagist.org/packages/astrotomic/php-weserv-images)[ Docs](https://astrotomic.info)[ Fund](https://forest.astrotomic.info)[ GitHub Sponsors](https://github.com/Gummibeer)[ RSS](/packages/astrotomic-php-weserv-images/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (7)Dependencies (2)Versions (9)Used By (1)

PHP images.weserv.nl
====================

[](#php-imagesweservnl)

[![Latest Version](https://camo.githubusercontent.com/c308fedc026b4edf245d81b9daa1cd4d775bac83dc7e6c4cdfb9908bfdcc81c8/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617374726f746f6d69632f7068702d7765736572762d696d616765732e7376673f6c6162656c3d52656c65617365267374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/astrotomic/php-weserv-images)[![MIT License](https://camo.githubusercontent.com/40a2aca8fb59ca100f2f396a95adf614e140a69541a042b1172c948301040b8e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f417374726f746f6d69632f7068702d7765736572762d696d616765732e7376673f6c6162656c3d4c6963656e736526636f6c6f723d626c7565267374796c653d666f722d7468652d6261646765)](https://github.com/Astrotomic/php-weserv-images/blob/master/LICENSE)[![Offset Earth](https://camo.githubusercontent.com/d204555ebe1fb0ae82d10c97b4f4ffc2dfdd2ba1489f98be7f7e8708333a0466/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54726565776172652d2546302539462538432542332d677265656e3f7374796c653d666f722d7468652d6261646765)](https://plant.treeware.earth/Astrotomic/php-weserv-images)[![Larabelles](https://camo.githubusercontent.com/a2c8d5126ddd8c5ddc627176d1d2e0568f8399b50038e71fd7f774c3e24dbe4b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726162656c6c65732d2546302539462541362538342d6c6967687470696e6b3f7374796c653d666f722d7468652d6261646765)](https://www.larabelles.com/)

[![GitHub Workflow Status](https://camo.githubusercontent.com/0446b75cc5a2ccd299af16a502483950ec542337ff7c8750431476acec4324b1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f417374726f746f6d69632f7068702d7765736572762d696d616765732f72756e2d74657374733f7374796c653d666c61742d737175617265266c6f676f436f6c6f723d7768697465266c6f676f3d676974687562266c6162656c3d5465737473)](https://github.com/Astrotomic/php-weserv-images/actions?query=workflow%3Arun-tests)[![StyleCI](https://camo.githubusercontent.com/59a9eb0f1364397926e93ccedeabe313885f8faff30f4a8f2c3e02383d4acd34/68747470733a2f2f7374796c6563692e696f2f7265706f732f3234333736353034332f736869656c64)](https://styleci.io/repos/243765043)[![Total Downloads](https://camo.githubusercontent.com/16d52999fec6e2a4c6ec219a28a0b0d93a6d8cc4456d3a309976c64ce53e15b7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617374726f746f6d69632f7068702d7765736572762d696d616765732e7376673f6c6162656c3d446f776e6c6f616473267374796c653d666c61742d737175617265)](https://packagist.org/packages/astrotomic/php-weserv-images)

This package provides a fluent PHP OOP builder for [images.weserv.nl](https://images.weserv.nl).

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

[](#installation)

You can install the package via composer:

```
composer require astrotomic/php-weserv-images
```

Usage
-----

[](#usage)

```
use Astrotomic\Weserv\Images\Url;
use Astrotomic\Weserv\Images\Enums\Fit;

$url = new Url('https://images.weserv.nl/lichtenstein.jpg');
$url->w(512)->h(512)->we()->fit(Fit::INSIDE);

echo $url;
// https://images.weserv.nl/?w=512&h=512&we=1&fit=inside&url=https%3A%2F%2Fimages.weserv.nl%2Flichtenstein.jpg
```

[![](https://camo.githubusercontent.com/2586ae1f3bfb74707ab75ae0880f1e88b587ff9616c9d65bc4640702328abfef/68747470733a2f2f696d616765732e7765736572762e6e6c2f3f773d35313226683d3531322677653d31266669743d696e736964652675726c3d6874747073253341253246253246696d616765732e7765736572762e6e6c2532466c69636874656e737465696e2e6a7067)](https://camo.githubusercontent.com/2586ae1f3bfb74707ab75ae0880f1e88b587ff9616c9d65bc4640702328abfef/68747470733a2f2f696d616765732e7765736572762e6e6c2f3f773d35313226683d3531322677653d31266669743d696e736964652675726c3d6874747073253341253246253246696d616765732e7765736572762e6e6c2532466c69636874656e737465696e2e6a7067)

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/Astrotomic/.github/blob/master/CONTRIBUTING.md) for details. You could also be interested in [CODE OF CONDUCT](https://github.com/Astrotomic/.github/blob/master/CODE_OF_CONDUCT.md).

### Security

[](#security)

If you discover any security related issues, please check [SECURITY](https://github.com/Astrotomic/.github/blob/master/SECURITY.md) for steps to report it.

Credits
-------

[](#credits)

- [Tom Witkowski](https://github.com/Gummibeer)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Treeware
--------

[](#treeware)

You're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to [plant trees](https://www.bbc.co.uk/news/science-environment-48870920). If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees at [offset.earth/treeware](https://plant.treeware.earth/Astrotomic/php-weserv-images)

Read more about Treeware at [treeware.earth](https://treeware.earth)

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance59

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

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

Every ~213 days

Recently: every ~320 days

Total

7

Last Release

1024d ago

Major Versions

0.4.1 → 1.0.02020-06-24

PHP version history (2 changes)0.1.0PHP ^7.4

1.1.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6187884?v=4)[Tom Herrmann](/maintainers/Gummibeer)[@Gummibeer](https://github.com/Gummibeer)

---

Top Contributors

[![Gummibeer](https://avatars.githubusercontent.com/u/6187884?v=4)](https://github.com/Gummibeer "Gummibeer (67 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (3 commits)")[![jamesmills](https://avatars.githubusercontent.com/u/557096?v=4)](https://github.com/jamesmills "jamesmills (1 commits)")[![SocolaDaiCa](https://avatars.githubusercontent.com/u/18243451?v=4)](https://github.com/SocolaDaiCa "SocolaDaiCa (1 commits)")

---

Tags

hacktoberfestimage-manipulationimage-processingimages-weservtreewareimagesastrotomicweservphp-weserv-images

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/astrotomic-php-weserv-images/health.svg)

```
[![Health](https://phpackages.com/badges/astrotomic-php-weserv-images/health.svg)](https://phpackages.com/packages/astrotomic-php-weserv-images)
```

###  Alternatives

[rosell-dk/webp-convert

Convert JPEG &amp; PNG to WebP with PHP

6058.7M59](/packages/rosell-dk-webp-convert)[jbzoo/image

A PHP class that simplifies working with images

171128.5k3](/packages/jbzoo-image)[mmo/faker-images

Different images provider for Faker

56403.1k7](/packages/mmo-faker-images)[mindkomm/timmy

Advanced image manipulation for Timber.

17737.1k](/packages/mindkomm-timmy)[wp-media/imagify-plugin

Image optimization plugin for WordPress by WP Media.

8065.3k](/packages/wp-media-imagify-plugin)[spatie/pixelmatch-php

Compare images using PHP

5896.4k16](/packages/spatie-pixelmatch-php)

PHPackages © 2026

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