PHPackages                             by/first-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. by/first-image

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

by/first-image
==============

A plugin to get first image from Redactor Field.

2.0.0(3y ago)41.1kMITPHP

Since Aug 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bhashkar007/first-image)[ Packagist](https://packagist.org/packages/by/first-image)[ RSS](/packages/by-first-image/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

First Image plugin for Craft CMS 3.x
====================================

[](#first-image-plugin-for-craft-cms-3x)

A plugin to get first image from Redactor Field.

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0 or later.

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

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require by/first-image

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for First Image.

Using First Image
-----------------

[](#using-first-image)

There are two ways of getting first image from a redactor field:

```
{{ entry.body | getFirstImage }}

```

or

```
{% set image = getFirstImage(entry.body) %}

```

This will output the source of the first image found, which then can be used in `` tag.

Brought to you by [Bhashkar Yadav](https://360adaptive.com)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~796 days

Total

3

Last Release

1280d ago

Major Versions

1.1.0 → 2.0.02022-12-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1473647?v=4)[Bhashkar Yadav](/maintainers/bhashkar007)[@bhashkar007](https://github.com/bhashkar007)

---

Top Contributors

[![bhashkar007](https://avatars.githubusercontent.com/u/1473647?v=4)](https://github.com/bhashkar007 "bhashkar007 (7 commits)")

---

Tags

cmsCraftcraftcmscraft-pluginfirst image

### Embed Badge

![Health badge](/badges/by-first-image/health.svg)

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

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k59](/packages/verbb-formie)[nystudio107/craft-seomatic

SEOmatic facilitates modern SEO best practices &amp; implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.

1741.5M53](/packages/nystudio107-craft-seomatic)[verbb/navigation

Create navigation menus for your site.

92705.0k18](/packages/verbb-navigation)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)[verbb/field-manager

Manage your fields and field groups with ease.

195614.7k10](/packages/verbb-field-manager)

PHPackages © 2026

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