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. by/first-image

ActiveCraft-plugin

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 3d 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 68% 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

1233d ago

Major Versions

1.1.0 → 2.0.02022-12-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/81237c96f024cd781b34acc8b6de40a9ed2668a5d7f988fc2c643bbbdac91897?d=identicon)[bhashkar007](/maintainers/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

[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.4M46](/packages/nystudio107-craft-seomatic)[verbb/image-resizer

Resize assets when they are uploaded.

127269.1k7](/packages/verbb-image-resizer)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[wrav/oembed

A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.

36205.0k3](/packages/wrav-oembed)[verbb/hyper

A user-friendly links field for Craft.

24130.9k9](/packages/verbb-hyper)[verbb/social-poster

Automatically post entries to social media.

918.5k](/packages/verbb-social-poster)

PHPackages © 2026

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