PHPackages                             germania-kg/imagefinder - 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. germania-kg/imagefinder

ActiveLibrary

germania-kg/imagefinder
=======================

1.0.4(4y ago)026MITPHPPHP ^5.6|^7.0

Since Jan 2Pushed 3y ago2 watchersCompare

[ Source](https://github.com/GermaniaKG/ImageFinder)[ Packagist](https://packagist.org/packages/germania-kg/imagefinder)[ RSS](/packages/germania-kg-imagefinder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (7)Used By (0)

Germania KG · ImageFinder
=========================

[](#germania-kg-imagefinder)

**Callable wrapper around [Symfony's Finder Component.](http://symfony.com/doc/current/components/finder.html)
For convenience purposes prepared for finding image files.**

[![Packagist](https://camo.githubusercontent.com/f0e6b4028c9b27706c8370d5a1dca50d5e629d9a33f984b27770d2ec33dbb107/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6765726d616e69612d6b672f696d61676566696e6465722e7376673f7374796c653d666c6174)](https://packagist.org/packages/germania-kg/imagefinder)[![PHP version](https://camo.githubusercontent.com/0302c5049c1247702868051bcfa506d446ba030255f7f827dd0d77f67f49854b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6765726d616e69612d6b672f696d61676566696e6465722e737667)](https://packagist.org/packages/germania-kg/imagefinder)[![Build Status](https://camo.githubusercontent.com/79a8636382da6397719d4a2e49f0cd7b0fbd2207d76623e6559544aa17822391/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4765726d616e69614b472f496d61676546696e6465722e7376673f6c6162656c3d5472617669732532304349)](https://travis-ci.org/GermaniaKG/ImageFinder)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b5cc812539ee987a84d029cbe7375b64aa1681fcc9b3206a52490ed44b0a1e53/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4765726d616e69614b472f496d61676546696e6465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/GermaniaKG/ImageFinder/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/8f60f1f1a99336558d6beb4f58feca0879a27433164d0c8122f68008e35015ab/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4765726d616e69614b472f496d61676546696e6465722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/GermaniaKG/ImageFinder/?branch=master)[![Build Status](https://camo.githubusercontent.com/365221cd9b8c4dc7c327d67a8037600ffb0b49b3cd33be7a31f212f8b0dab7fe/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4765726d616e69614b472f496d61676546696e6465722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/GermaniaKG/ImageFinder/build-status/master)

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

[](#installation)

```
$ composer require germania-kg/imagefinder
```

Usage
-----

[](#usage)

Each iterator item will be an instance of Symfony's [SplFileInfo extension](http://api.symfony.com/3.2/Symfony/Component/Finder/SplFileInfo.html).

```
use Germania\ImageFinder\ImageFinder;
use Symfony\Component\Finder\Finder;

// Setup
$finder = new Finder;
$image_finder = new ImageFinder( $finder );

// Grab from directory
$images = $image_finder( '/path/to/photos' );

foreach ($images as $image) {

	// Stolen from Symfony docs:
    // Dump the absolute path
    var_dump($file->getRealPath());

    // Dump the relative path to the file, omitting the filename
    var_dump($file->getRelativePath());

    // Dump the relative path to the file
    var_dump($file->getRelativePathname());
}
```

Customization
-------------

[](#customization)

The constructor accepts an array with allowed file extensions.

```
$allowed = array("jpe?g", "webp" );
$image_finder = new ImageFinder( $finder, $allowed );
```

To configure allowed extensions during runtime, set member variable **extensions**:

```
$image_finder = new ImageFinder( $finder);
$image_finder->extensions = array("jpe?g", "webp" );
```

Development
-----------

[](#development)

```
$ git clone https://github.com/GermaniaKG/ImageFinder.git
$ cd ImageFinder
$ composer install
```

Unit tests
----------

[](#unit-tests)

Either copy `phpunit.xml.dist` to `phpunit.xml` and adapt to your needs, or leave as is. Run [PhpUnit](https://phpunit.de/) test or composer scripts like this:

```
$ composer test
# or
$ vendor/bin/phpunit
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

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

Total

5

Last Release

1501d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba1899945696f873f95de5e2b8f7519960f1b4e59f61e607b4cbbd8880d244e1?d=identicon)[germania-kg](/maintainers/germania-kg)

---

Top Contributors

[![tomkyle](https://avatars.githubusercontent.com/u/412560?v=4)](https://github.com/tomkyle "tomkyle (15 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/germania-kg-imagefinder/health.svg)

```
[![Health](https://phpackages.com/badges/germania-kg-imagefinder/health.svg)](https://phpackages.com/packages/germania-kg-imagefinder)
```

###  Alternatives

[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k235.4M9.6k](/packages/symfony-framework-bundle)[laravel/pennant

A simple, lightweight library for managing feature flags.

57311.1M53](/packages/laravel-pennant)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4723.6M20](/packages/coenjacobs-mozart)[horstoeko/zugferd

A library for creating and reading european electronic invoices

4044.3M17](/packages/horstoeko-zugferd)

PHPackages © 2026

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