PHPackages                             naba0123/commonmark-ext-img-url-prefix - 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. naba0123/commonmark-ext-img-url-prefix

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

naba0123/commonmark-ext-img-url-prefix
======================================

Extension for league/commonmark to add prefix to src url of Img tag with specitific distinction

1.0(4y ago)055MITPHPPHP ^7.4

Since Jul 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Naba0123/commonmark-ext-img-url-prefix)[ Packagist](https://packagist.org/packages/naba0123/commonmark-ext-img-url-prefix)[ Docs](https://github.com/Naba0123/commonmark-ext-img-url-prefix)[ RSS](/packages/naba0123-commonmark-ext-img-url-prefix/feed)WikiDiscussions main Synced 1mo ago

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

Img url prefix extension
========================

[](#img-url-prefix-extension)

Extension for league/commonmark to add prefix url to img with specitific distinction.

Install
-------

[](#install)

```
composer require naba0123/commonmark-ext-img-url-prefix

```

Example

```
$environment = \League\CommonMark\Environment::createCommonMarkEnvironment();
$environment->addExtension(new \Naba0123\CommonMark\Ext\ImgPreUrl\ImgPreUrlExtension());

$converter = new \League\CommonMark\CommonMarkConverter([
	'img_pre_url-pre_url' => '/example/dir/',
	'img_pre_url-distinction_char' => '@',
], $environment);

echo $converter->convertToHtml('![Alt Text](path.jpg)');

```

The above is converted to Img tag as the following

```

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

2

Last Release

1757d ago

Major Versions

0.3 → 1.02021-07-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/880bbca275ae6938f10ce20d98fa3a3dbfe9cecc02dfb70d25e382cb252bc189?d=identicon)[Naba0123](/maintainers/Naba0123)

---

Top Contributors

[![Naba0123](https://avatars.githubusercontent.com/u/11944066?v=4)](https://github.com/Naba0123 "Naba0123 (11 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/naba0123-commonmark-ext-img-url-prefix/health.svg)

```
[![Health](https://phpackages.com/badges/naba0123-commonmark-ext-img-url-prefix/health.svg)](https://phpackages.com/packages/naba0123-commonmark-ext-img-url-prefix)
```

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[phiki/phiki

Syntax highlighting using TextMate grammars in PHP.

3573.0M23](/packages/phiki-phiki)[spatie/commonmark-highlighter

Highlight your markdown code blocks with league/commonmark

138400.5k19](/packages/spatie-commonmark-highlighter)[monsieurbiz/sylius-rich-editor-plugin

A Rich Editor plugin for Sylius.

75380.8k6](/packages/monsieurbiz-sylius-rich-editor-plugin)[horstoeko/zugferdvisualizer

A library

33198.3k2](/packages/horstoeko-zugferdvisualizer)[torchlight/engine

The PHP-based Torchlight code annotation and rendering engine.

655.7k4](/packages/torchlight-engine)

PHPackages © 2026

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