PHPackages                             jacerider/neo\_image - 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. jacerider/neo\_image

ActiveDrupal-module[Image &amp; Media](/categories/media)

jacerider/neo\_image
====================

Improved responsive image handler along with other image enhancements.

1.0.29(2mo ago)04221proprietaryPHP

Since Aug 26Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/jacerider/neo_image)[ Packagist](https://packagist.org/packages/jacerider/neo_image)[ Docs](https://github.com/jacerider/neo_image)[ RSS](/packages/jacerider-neo-image/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (6)Versions (31)Used By (1)

CONTENTS OF THIS FILE
---------------------

[](#contents-of-this-file)

- Introduction
- Requirements
- Installation
- Twig
- Responsive Image Generator
- Image Style Generator
- Image Style Naming Conventions

INTRODUCTION
------------

[](#introduction)

Improved responsive image handler along with other image enhancements.

REQUIREMENTS
------------

[](#requirements)

This module requires the webp contrib module.

-

INSTALLATION
------------

[](#installation)

Install as you would normally install a contributed Drupal module. Visit  for further information.

TWIG
----

[](#twig)

There are 3 twig helpers available:

Single image
------------

[](#single-image)

```

{{ neo_image_style(src, {auto: {width: 100}}, alt) }}

{{ neo_image_style(src, {exact: {width: 100, height: 100}}, alt) }}

{{ neo_image_style(src, {scale: {width: 100}}, alt) }}
{{ neo_image_style(src, {scaleCrop: {width: 100, height: 100}}, alt) }}

{{ neo_image_style(entity, {scale: {width: 100}}) }}
```

Responsive image
----------------

[](#responsive-image)

```

{{ neo_image(src, {sm: {op: 'exact', width: 100, height: 100}, md: {op: 'exact', width: 200, height: 200}}, alt) }}

{{ neo_image(entity, {sm: {op: 'exact', width: 100, height: 100}, md: {op: 'exact', width: 200, height: 200}}, alt) }}
```

RESPONSIVE IMAGE GENERATOR
--------------------------

[](#responsive-image-generator)

Build a picture element that provides breakpoint media query images along with webp support.

From Media or File Entity
-------------------------

[](#from-media-or-file-entity)

```
/** @var \Drupal\media\MediaInterface $entity */
$entity = \Drupal::entityTypeManager()->getStorage('media')->load(1);
$neoImage = NeoImage::createFromEntity($entity);
$neoImage->getSm()->scaleCrop(200, 200);
$neoImage->getMd()->crop(400, 300, 'left-top');
$neoImage->getLg()->scale(600);
// The auto() method will use 'focal_point_scale_and_crop' when width and height
// are provided, and 'image_scale' when width or height are provided.
$neoImage->getXl()->auto(1400, 800);
// The focal() method uses the focal_point module to perserve the focused area
// with the crop.
$neoImage->get2Xl()->focal(1600, 1000);
$build = $neoImage->toRenderable();
```

IMAGE STYLE GENERATOR
---------------------

[](#image-style-generator)

Build a dynamic image style that will utilize on-demand effects.

```
/** @var \Drupal\media\MediaInterface $entity */
$entity = \Drupal::entityTypeManager()->getStorage('media')->load(1);
$neoImageStyle = new NeoImageStyle();
$neoImageStyle->focal(300, 300);
$neoImageStyle->toRenderableFromEntity($entity, 'Alt Text', 'Title Text');

$uri = 'public://image/image.png';
$neoImageStyle = new NeoImageStyle();
$neoImageStyle->focal(300, 300);
$neoImageStyle->toRenderableFromUri($uri, 'Alt Text', 'Title Text');
```

IMAGE STYLE NAMING CONVENTIONS
------------------------------

[](#image-style-naming-conventions)

Image styles are automatically created based on the effects added to a given style. The style names are such that they are a short as possible and URL-safe.

Image Effect Conversion
-----------------------

[](#image-effect-conversion)

ShortcodeImage EffectPropertiesrimage\_resize[w\*, h\*](#property-conversion)simage\_scale[w, h](#property-conversion)cimage\_crop[w\*, h\*, a\*](#property-conversion)csimage\_crop\_sidesscimage\_scale\_and\_crop[w\*, h\*, a\*](#property-conversion)ffocal\_point\_scale\_and\_crop[w\*, h\*](#property-conversion)fwfocal\_point\_crop\_by\_width[w\*](#property-conversion)eexact[w, h, a\*](#property-conversion)Property Conversion
-------------------

[](#property-conversion)

ShortcodePropertyValuewwidthnumberhheightnumberaanchor[Anchor Conversion](#anchor-conversion)Anchor Conversion
-----------------

[](#anchor-conversion)

ShortcodeAnchor Positionltleft-topctcenter-toprtright-toplleft-centerccenter-centerrright-centerlbleft-bottomcbcenter-bottomrbright-bottom

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance86

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

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

Every ~19 days

Recently: every ~26 days

Total

30

Last Release

69d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/097ea6514c7dff8bd82162fe88411080a14444a73f86c15ab22eefe28a33059d?d=identicon)[jacerider](/maintainers/jacerider)

---

Top Contributors

[![jacerider](https://avatars.githubusercontent.com/u/638651?v=4)](https://github.com/jacerider "jacerider (40 commits)")

### Embed Badge

![Health badge](/badges/jacerider-neo-image/health.svg)

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

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[intervention/image-driver-vips

libvips driver for Intervention Image

4495.5k6](/packages/intervention-image-driver-vips)

PHPackages © 2026

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