Download the PHP package by/first-image without Composer
On this page you can find all versions of the php package by/first-image. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download by/first-image
More information about by/first-image
Files in by/first-image
Download by/first-image
More information about by/first-image
Files in by/first-image
Vendor by
Package first-image
Short Description A plugin to get first image from Redactor Field.
License MIT
Package first-image
Short Description A plugin to get first image from Redactor Field.
License MIT
Please rate this library. Is it a good library?
Informations about the package first-image
First Image plugin for Craft CMS 3.x
A plugin to get first image from Redactor Field.
Requirements
This plugin requires Craft CMS 3.0.0 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require by/first-image
- In the Control Panel, go to Settings → Plugins and click the “Install” button for 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 <img>
tag.
Brought to you by Bhashkar Yadav
All versions of first-image with dependencies
PHP Build Version
Package Version
Requires
craftcms/cms Version
^4.0.0
The package by/first-image contains the following files
Loading the files please wait ....