PHPackages                             campaigningbureau/laravel-static-image-cache - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. campaigningbureau/laravel-static-image-cache

ActiveLibrary[File &amp; Storage](/categories/file-storage)

campaigningbureau/laravel-static-image-cache
============================================

store/cache external images as a static file

v10.1.0(1y ago)016.2k1MITPHPPHP ^8.1

Since Apr 7Pushed 1y ago3 watchersCompare

[ Source](https://github.com/CampaigningBureau/laravel-static-image-cache)[ Packagist](https://packagist.org/packages/campaigningbureau/laravel-static-image-cache)[ RSS](/packages/campaigningbureau-laravel-static-image-cache/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (6)Versions (21)Used By (1)

laravel-static-image-cache
==========================

[](#laravel-static-image-cache)

> store/cache external images as a static file

Replaces URIs by a proxy route.

When this proxy route is called, the original image is cached inside the configured directory and returned.

If the requested file was already cached, it is instead directly returned by the webserver.

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

[](#installation)

```
composer require campaigningbureau/laravel-static-image-cache

```

Supported versions
------------------

[](#supported-versions)

Package versionRequired Laravel versionMinimum PHP versionv10.110.x or 11.x8.1v8.087.3.0v7.077.2.5v5.06.07.2v4.05.87.1.3v3.05.67.1.3v2.0&lt; 5.67.0Setup
-----

[](#setup)

Add the service provider to the `app.php` provider array

```
/*
 * Package Service Providers...
 */
CampaigningBureau\LaravelStaticImageCache\Provider\LaravelStaticImageCacheProvider::class,
```

Usage
-----

[](#usage)

This Package provides two helper functions: `static_image` and `statify_text`

### static\_image

[](#static_image)

The `static_image`-helper can be used to generate the static file url for a given image url.

```

```

### statify\_text

[](#statify_text)

This helper function automatically statifies images from all domains that are configured in the `statify_domains` config entry inside the given string.

Usage:

```
if (function_exists('statify_text')) {
    $text = statify_text($text);
}
```

Clear the files
---------------

[](#clear-the-files)

To clear all cached files manually you can use an artisan task.

```
php artisan static-image-cache:clear
```

Configuration
-------------

[](#configuration)

- `enabled`: defines, if proxying and storing of the images is activated. Can be set to `true`, `false` or `debug` (If `debug` the package will synchronise the flag with the `app.debug` config value)
- `cache_path_prefix`: The path prefix relative to `public_path`. This is where the images will be stored. This path will also be used as the proxy-url prefix.
- `statify_domains`: Holds an array of all domains that will be statified when calling the `statify_text` function.

Upgrade guide
-------------

[](#upgrade-guide)

### From v1.x to v2.0

[](#from-v1x-to-v20)

all usages of `staticImage()` need to be replaced by the new `static_image()` function.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 52% 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 ~162 days

Recently: every ~376 days

Total

18

Last Release

567d ago

Major Versions

v2.1.3 → v4.02019-04-16

v4.0 → 5.02019-09-09

5.0 → v7.02020-04-28

v7.0 → v8.02020-09-10

v8.2.0 → v10.02023-12-04

PHP version history (8 changes)v1.0PHP &gt;=7.0

v3.0PHP ^7.1.3

v7.0PHP ^7.2.5

v8.0PHP ^7.3.0

v8.1.0PHP ^7.3|^8.0

v8.2.0PHP ^7.3||^8.0

v10.0PHP ^7.3||^8.0||^8.1

v10.1.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3008376?v=4)[Campaigning Bureau](/maintainers/campaigningbureau)[@CampaigningBureau](https://github.com/CampaigningBureau)

---

Top Contributors

[![stefanschindler](https://avatars.githubusercontent.com/u/786048?v=4)](https://github.com/stefanschindler "stefanschindler (13 commits)")[![mscharl](https://avatars.githubusercontent.com/u/1411972?v=4)](https://github.com/mscharl "mscharl (5 commits)")[![DmitrySidorenkoShim](https://avatars.githubusercontent.com/u/8822805?v=4)](https://github.com/DmitrySidorenkoShim "DmitrySidorenkoShim (4 commits)")[![slue](https://avatars.githubusercontent.com/u/5067774?v=4)](https://github.com/slue "slue (3 commits)")

### Embed Badge

![Health badge](/badges/campaigningbureau-laravel-static-image-cache/health.svg)

```
[![Health](https://phpackages.com/badges/campaigningbureau-laravel-static-image-cache/health.svg)](https://phpackages.com/packages/campaigningbureau-laravel-static-image-cache)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[torchlight/torchlight-laravel

A Laravel Client for Torchlight, the syntax highlighting API.

120452.8k11](/packages/torchlight-torchlight-laravel)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

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