Files
acrib.es/wp-content/plugins/kadence-blocks/vendor/vendor-prefixed/stellarwp/prophecy-image-downloader
Malin f3ff7b7186 feat: initial ACRIB WordPress deployment
- WordPress 6.9.4 (es_ES) with Kadence theme
- Homepage: Hero, La Asociación, Pilares, Beneficios, Eventos, Miembros, Hazte Miembro, Contacto
- Brand identity: #13294b navy, #a12932 burgundy, #c69c48 gold
- Fonts: Raleway (headings) + Source Sans 3 (body) + Lato (UI)
- Plugins: Kadence Blocks, Polylang, Contact Form 7
- Custom CSS with full brand styling and responsive layout
- HTTPS enforced via wp-config.php proxy detection
2026-05-19 19:25:59 +02:00
..

Prophecy Image Downloader

⚠️ This is a read-only repository! For pull requests or issues, see stellarwp/prophecy-monorepo.

A very fast, asynchronous concurrent image downloader built on symfony/http-client.

Installation

Update your composer.json and add the following to your repositories object:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "git@github.com:stellarwp/prophecy-container.git"
        },
        {
            "type": "vcs",
            "url": "git@github.com:stellarwp/prophecy-log.git"
        },
        {
            "type": "vcs",
            "url": "git@github.com:stellarwp/prophecy-image-downloader.git"
        }        
    ]
}

Then, install:

composer require stellarwp/prophecy-image-downloader

If using the di52 container, create a config.php and register it in the container with:

$this->container->bind(Dot::class, new Dot(require_once dirname(__FILE__) . '/config.php'));

The config.php file map environment variables, either from an .env file or manually set, e.g.

<?php declare(strict_types=1);

return [
    'image_batch_size' => $_ENV['APP_IMAGE_BATCH_SIZE'] ?? 10,
	'storage_path'     => $_ENV['APP_STORAGE_PATH'] ?? '/tmp', // This could be the path to your wp-content/uploads folder.
];

Then, include the ImageProvider.php, or create a custom/modified version of it and call the register method.

The downloader is meant to work with the Prophecy Laravel Service's API responses, however if you format your array in the same way that ImageDownloader::download() accepts, it will fetch the files to your configured location:

File Name Sanitization

The system provides some basic file name sanitization, but you can also use your framework's strategy or make a custom strategy, as long as it implements the Sanitizer Contract.

For example, to use WordPress's file name sanitization, simply bind the interface to the provided WPFileNameStrategy, e.g. using di52's container:

$this->container->bind(Sanitizer::class, \StellarWP\ProphecyMonorepo\ImageDownloader\Sanitization\Sanitizers\WPFileNameSanitizer::class);