PHPackages                             ivovalchev/image-extension - 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. ivovalchev/image-extension

ActiveBolt-extension[Image &amp; Media](/categories/media)

ivovalchev/image-extension
==========================

Image extension with useful functions for Bolt CMS

1.1.4(4y ago)31.7k2[1 issues](https://github.com/I-Valchev/image-extension/issues)MITPHPPHP &gt;=7.1.3

Since Apr 29Pushed 4y ago3 watchersCompare

[ Source](https://github.com/I-Valchev/image-extension)[ Packagist](https://packagist.org/packages/ivovalchev/image-extension)[ RSS](/packages/ivovalchev-image-extension/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (8)Dependencies (3)Versions (8)Used By (0)

Bolt CMS Image Extension
========================

[](#bolt-cms-image-extension)

Responsive image extension for Bolt CMS using sizes and srcset.

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

[](#installation)

To install, run the following command in your Bolt root directory:

`composer require ivovalchev/image-extension`

Usage
-----

[](#usage)

### Simple usage with defaults

[](#simple-usage-with-defaults)

Use the extension in any twig template:

`{{ responsive_image(record|image) }}`

### Usage with custom config settings (re-usable)

[](#usage-with-custom-config-settings-re-usable)

The extension config is located at `config/extensions/ivovalchev-imageextension.yaml`.

Example custom configuration:

```
for_blogpost:
     widths: [ 340, 680, 960, 1260 ]
     heights: [ 300, 600, 840, 1100 ] # Optional. If heights is not set, the height will be relative to the width.
     fit: default # Uses Bolt's `thumbnail` fit options. Pass an array, e.g. [ crop, fit, crop ] to adjust for different widths.
     class: 'blog-image'
     sizes: ["(min-width: 1260px) 1260px", "(min-width: 780px) 680px", "(min-width: 480px) 340px", "100vw"]

```

Then, to use the custom config in twig:

```
{{ responsive_image(myimage, 'for_blogpost') }}

```

### Usage with config settings as params

[](#usage-with-config-settings-as-params)

```
{{ responsive_image(myimage, 'default', {'widths': [400, 500, 600, 700] }) }}

```

Alternatively, using Twig named arguments:

```
{{ responsive_image(myimage, options={'widths': [400, 500, 600, 700]}) }}
```

Note: In the example above, any config option that is not supplied will be defaulted to the config name `'default'`.

### How to use `responsive_image` with images inside Set fields

[](#how-to-use-responsive_image-with-images-inside-set-fields)

If you get the following error message

```
Argument 1 passed to IvoValchev\ImageExtension\Twig\ImageExtension::getResponsiveImage() must be an instance of Bolt\Entity\Field\ImageField or null, array given

```

it probably means that you are trying to pass the image value, rather than the image itself to the `responsive_image` function. This happens most often inside a set.

If you bump into this, update your twig template:

From using a set like this:

```
{{ responsive_image(section.photo) }} {# given section is a field of type set #}
```

To this:

```
{{ responsive_image(section.value.photo) }} {# note the `.value` #}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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 ~109 days

Recently: every ~143 days

Total

7

Last Release

1552d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78ae1389d35ad7a4cda25bce02c73b64994823df39bc8bd023eea17dd4a54dc9?d=identicon)[I-Valchev](/maintainers/I-Valchev)

---

Top Contributors

[![I-Valchev](https://avatars.githubusercontent.com/u/7093518?v=4)](https://github.com/I-Valchev "I-Valchev (24 commits)")[![bobdenotter](https://avatars.githubusercontent.com/u/1833361?v=4)](https://github.com/bobdenotter "bobdenotter (4 commits)")

###  Code Quality

Code StyleECS

### Embed Badge

![Health badge](/badges/ivovalchev-image-extension/health.svg)

```
[![Health](https://phpackages.com/badges/ivovalchev-image-extension/health.svg)](https://phpackages.com/packages/ivovalchev-image-extension)
```

###  Alternatives

[liip/imagine-bundle

This bundle provides an image manipulation abstraction toolkit for Symfony-based projects.

1.7k38.3M217](/packages/liip-imagine-bundle)[gregwar/image-bundle

Image handling bundle

1941.5M9](/packages/gregwar-image-bundle)[mezcalito/imgproxy-bundle

115.7k2](/packages/mezcalito-imgproxy-bundle)[codebuds/webp-conversion-bundle

A Symfony bundle to generate WebPImages

124.1k](/packages/codebuds-webp-conversion-bundle)

PHPackages © 2026

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