From 7673cf772f2d4cd26306f350edb40d2640148c8d Mon Sep 17 00:00:00 2001 From: Arnaud Ligny Date: Wed, 19 Mar 2025 16:09:06 +0100 Subject: [PATCH 1/9] feat: add support of VIPS --- composer.json | 1 + composer.lock | 143 +++++++++++++++++++++++++++++++++++++++++-- src/Assets/Image.php | 32 +++++++--- 3 files changed, 164 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 2f1dc8c2f..dbfd68921 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ "dflydev/dot-access-data": "^3.0", "erusev/parsedown-extra": "^0.8", "intervention/image": "^3.11", + "intervention/image-driver-vips": "^1.0", "laravel-zero/phar-updater": "^1.4", "matthiasmullie/minify": "^1.3", "performing/twig-components": "^0.6", diff --git a/composer.lock b/composer.lock index 00eb82ced..843c927be 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "29ea3e2c49556735522af33d3de95540", + "content-hash": "e7de39d97ec8b9c2db3be7aecdae027d", "packages": [ { "name": "benjaminhoegh/parsedown-toc", @@ -581,6 +581,141 @@ ], "time": "2025-02-27T13:08:55+00:00" }, + { + "name": "intervention/image-driver-vips", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/Intervention/image-driver-vips.git", + "reference": "86bd626e7f91ad5546bb8c460b68c893a2f8581f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Intervention/image-driver-vips/zipball/86bd626e7f91ad5546bb8c460b68c893a2f8581f", + "reference": "86bd626e7f91ad5546bb8c460b68c893a2f8581f", + "shasum": "" + }, + "require": { + "intervention/image": "^3.11.0", + "jcupitt/vips": "^2.4", + "php": "^8.1" + }, + "require-dev": { + "ext-fileinfo": "*", + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^10.0 || ^11.0 || ^12.0", + "slevomat/coding-standard": "~8.0", + "squizlabs/php_codesniffer": "^3.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Intervention\\Image\\Drivers\\Vips\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oliver Vogel", + "email": "oliver@intervention.io", + "homepage": "https://intervention.io/" + }, + { + "name": "Thomas Picquet", + "email": "thomas@sctr.net" + } + ], + "description": "libvips driver for Intervention Image", + "homepage": "https://image.intervention.io/", + "keywords": [ + "image", + "libvips", + "vips" + ], + "support": { + "issues": "https://github.com/Intervention/image-driver-vips/issues", + "source": "https://github.com/Intervention/image-driver-vips/tree/1.0.3" + }, + "funding": [ + { + "url": "https://paypal.me/interventionio", + "type": "custom" + }, + { + "url": "https://github.com/Intervention", + "type": "github" + }, + { + "url": "https://ko-fi.com/interventionphp", + "type": "ko_fi" + } + ], + "time": "2025-02-20T14:22:00+00:00" + }, + { + "name": "jcupitt/vips", + "version": "v2.4.1", + "source": { + "type": "git", + "url": "https://github.com/libvips/php-vips.git", + "reference": "256575d7c5247d4fb3e98bf10ab1e10a571684c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/libvips/php-vips/zipball/256575d7c5247d4fb3e98bf10ab1e10a571684c7", + "reference": "256575d7c5247d4fb3e98bf10ab1e10a571684c7", + "shasum": "" + }, + "require": { + "ext-ffi": "*", + "php": ">=7.4", + "psr/log": "^1.1.3|^2.0|^3.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpdocumentor/shim": "^3.3", + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jcupitt\\Vips\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Cupitt", + "email": "jcupitt@gmail.com", + "homepage": "https://github.com/jcupitt", + "role": "Developer" + } + ], + "description": "A high-level interface to the libvips image processing library.", + "homepage": "https://github.com/libvips/php-vips", + "keywords": [ + "image", + "libvips", + "processing" + ], + "support": { + "issues": "https://github.com/libvips/php-vips/issues", + "source": "https://github.com/libvips/php-vips/tree/v2.4.1" + }, + "time": "2025-01-13T16:58:09+00:00" + }, { "name": "laravel-zero/phar-updater", "version": "v1.4.0", @@ -10133,7 +10268,7 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false, "platform": { @@ -10142,9 +10277,9 @@ "ext-gd": "*", "ext-mbstring": "*" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { "php": "8.1.31" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/src/Assets/Image.php b/src/Assets/Image.php index c357d284b..83ffca37d 100644 --- a/src/Assets/Image.php +++ b/src/Assets/Image.php @@ -14,21 +14,30 @@ namespace Cecil\Assets; use Cecil\Exception\RuntimeException; +use Intervention\Image\Drivers\Vips\Driver as VipsDriver; +use Intervention\Image\Drivers\Gd\Driver as GdDriver; +use Intervention\Image\Drivers\Imagick\Driver as ImagickDriver; use Intervention\Image\Encoders\AutoEncoder; use Intervention\Image\ImageManager; class Image { /** - * Create new manager instance with desired driver. + * Create new manager instance with available driver, faster first. */ private static function manager(): ImageManager { - if (\extension_loaded('gd') && \function_exists('gd_info')) { - return ImageManager::gd(); - } - if (\extension_loaded('imagick') && class_exists('Imagick')) { - return ImageManager::imagick(); + try { + // Vips is the fastest driver + return ImageManager::withDriver(VipsDriver::class); + } catch (\Exception) { + // fallback to GD or Imagick + if (\extension_loaded('gd') && \function_exists('gd_info')) { + return ImageManager::withDriver(GdDriver::class); + } + if (\extension_loaded('imagick') && class_exists('Imagick')) { + return ImageManager::withDriver(ImagickDriver::class); + } } throw new RuntimeException('PHP GD or Imagick extension is required.'); @@ -100,8 +109,15 @@ public static function getDominantColor(Asset $asset): string $image = self::manager()->read(self::resize($asset, 100, 50)); return $image->reduceColors(1)->pickColor(0, 0)->toString(); - } catch (\Exception $e) { - throw new RuntimeException(\sprintf('Can\'t get dominant color of "%s": %s', $asset['path'], $e->getMessage())); + } catch (\Exception) { + // fallback to GD driver + try { + $image = ImageManager::withDriver(GdDriver::class)->read(self::resize($asset, 100, 50)); + + return $image->reduceColors(1)->pickColor(0, 0)->toString(); + } catch (\Exception $e) { + throw new RuntimeException(\sprintf('Can\'t get dominant color of "%s": %s', $asset['path'], $e->getMessage())); + } } } From 0c32344323e903d89335ee37aa08bcab2c37cce9 Mon Sep 17 00:00:00 2001 From: Arnaud Ligny Date: Sun, 31 Aug 2025 19:55:38 +0200 Subject: [PATCH 2/9] Update Image.php --- src/Asset/Image.php | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/Asset/Image.php b/src/Asset/Image.php index eaa54b694..6ec7e0e96 100644 --- a/src/Asset/Image.php +++ b/src/Asset/Image.php @@ -15,9 +15,9 @@ use Cecil\Asset; use Cecil\Exception\RuntimeException; -use Intervention\Image\Drivers\Vips\Driver as VipsDriver; use Intervention\Image\Drivers\Gd\Driver as GdDriver; use Intervention\Image\Drivers\Imagick\Driver as ImagickDriver; +use Intervention\Image\Drivers\Vips\Driver as VipsDriver; use Intervention\Image\Encoders\AutoEncoder; use Intervention\Image\ImageManager; @@ -28,7 +28,7 @@ * and generating data URLs. * * This class uses the Intervention Image library to handle image processing. - * It supports both GD and Imagick drivers, depending on the available PHP extensions. + * It supports GD, Imagick and Vips drivers, depending on the available PHP extensions. */ class Image { @@ -37,17 +37,18 @@ class Image */ private static function manager(): ImageManager { - try { - // Vips is the fastest driver - return ImageManager::withDriver(VipsDriver::class); - } catch (\Exception) { - // fallback to GD or Imagick - if (\extension_loaded('gd') && \function_exists('gd_info')) { - return ImageManager::withDriver(GdDriver::class); - } - if (\extension_loaded('imagick') && class_exists('Imagick')) { - return ImageManager::withDriver(ImagickDriver::class); - } + $driver = null; + + if (\extension_loaded('imagick') && class_exists('Imagick')) { + $driver = ImagickDriver::class; + } + // GD is faster than Imagick + if (\extension_loaded('gd') && \function_exists('gd_info')) { + $driver = GdDriver::class; + } + // libvips is the fastest driver (if FFI is available) + if (\extension_loaded('ffi')) { + $driver = VipsDriver::class; } if ($driver) { @@ -62,7 +63,7 @@ private static function manager(): ImageManager ); } - throw new RuntimeException('PHP GD (or Imagick) extension is required.'); + throw new RuntimeException('PHP GD extension is required.'); } /** From 836458bfa6980abd65fc1943586843b3f380c361 Mon Sep 17 00:00:00 2001 From: Arnaud Ligny Date: Sun, 31 Aug 2025 19:55:45 +0200 Subject: [PATCH 3/9] Update composer.json --- composer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4c7ce29de..361dd7e48 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,7 @@ "ext-fileinfo": "*", "ext-gd": "*", "ext-mbstring": "*", + "ext-ffi": "*", "benjaminhoegh/parsedown-toc": "^1.5", "cecil/resource-watcher": "^4.0", "cocur/slugify": "^4.6", @@ -80,7 +81,8 @@ "ergebnis/composer-normalize": true }, "platform": { - "php": "8.1.32" + "php": "8.1.32", + "ext-ffi": "3.4.5" }, "sort-packages": true }, From 7e33386e816f5a44d861f22d39e2a8af10bb56e0 Mon Sep 17 00:00:00 2001 From: Arnaud Ligny Date: Sun, 31 Aug 2025 19:55:48 +0200 Subject: [PATCH 4/9] Update composer.lock --- composer.lock | 166 +++++++++++++++++++++++++------------------------- 1 file changed, 84 insertions(+), 82 deletions(-) diff --git a/composer.lock b/composer.lock index a4eecae75..f5e0772da 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e7de39d97ec8b9c2db3be7aecdae027d", + "content-hash": "e89ecd37987479faf7b78f78a70d8577", "packages": [ { "name": "benjaminhoegh/parsedown-toc", @@ -531,85 +531,18 @@ ], "time": "2025-07-30T13:13:19+00:00" }, - { - "name": "james-heinrich/getid3", - "version": "v1.9.23", - "source": { - "type": "git", - "url": "https://github.com/JamesHeinrich/getID3.git", - "reference": "06c7482532ff2b3f9111b011d880ca6699c8542b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JamesHeinrich/getID3/zipball/06c7482532ff2b3f9111b011d880ca6699c8542b", - "reference": "06c7482532ff2b3f9111b011d880ca6699c8542b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.0" - }, - "suggest": { - "ext-SimpleXML": "SimpleXML extension is required to analyze RIFF/WAV/BWF audio files (also requires `ext-libxml`).", - "ext-com_dotnet": "COM extension is required when loading files larger than 2GB on Windows.", - "ext-ctype": "ctype extension is required when loading files larger than 2GB on 32-bit PHP (also on 64-bit PHP on Windows) or executing `getid3_lib::CopyTagsToComments`.", - "ext-dba": "DBA extension is required to use the DBA database as a cache storage.", - "ext-exif": "EXIF extension is required for graphic modules.", - "ext-iconv": "iconv extension is required to work with different character sets (when `ext-mbstring` is not available).", - "ext-json": "JSON extension is required to analyze Apple Quicktime videos.", - "ext-libxml": "libxml extension is required to analyze RIFF/WAV/BWF audio files.", - "ext-mbstring": "mbstring extension is required to work with different character sets.", - "ext-mysql": "MySQL extension is required to use the MySQL database as a cache storage (deprecated in PHP 5.5, removed in PHP >= 7.0, use `ext-mysqli` instead).", - "ext-mysqli": "MySQLi extension is required to use the MySQL database as a cache storage.", - "ext-rar": "RAR extension is required for RAR archive module.", - "ext-sqlite3": "SQLite3 extension is required to use the SQLite3 database as a cache storage.", - "ext-xml": "XML extension is required for graphic modules to analyze the XML metadata.", - "ext-zlib": "Zlib extension is required for archive modules and compressed metadata." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9.x-dev" - } - }, - "autoload": { - "classmap": [ - "getid3/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-1.0-or-later", - "LGPL-3.0-only", - "MPL-2.0" - ], - "description": "PHP script that extracts useful information from popular multimedia file formats", - "homepage": "https://www.getid3.org/", - "keywords": [ - "codecs", - "php", - "tags" - ], - "support": { - "issues": "https://github.com/JamesHeinrich/getID3/issues", - "source": "https://github.com/JamesHeinrich/getID3/tree/v1.9.23" - }, - "time": "2023-10-19T13:18:49+00:00" - }, { "name": "intervention/image-driver-vips", - "version": "1.0.3", + "version": "1.0.6", "source": { "type": "git", "url": "https://github.com/Intervention/image-driver-vips.git", - "reference": "86bd626e7f91ad5546bb8c460b68c893a2f8581f" + "reference": "67f92c78cbe94a303f28d7ed84afd464eefac7aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Intervention/image-driver-vips/zipball/86bd626e7f91ad5546bb8c460b68c893a2f8581f", - "reference": "86bd626e7f91ad5546bb8c460b68c893a2f8581f", + "url": "https://api.github.com/repos/Intervention/image-driver-vips/zipball/67f92c78cbe94a303f28d7ed84afd464eefac7aa", + "reference": "67f92c78cbe94a303f28d7ed84afd464eefac7aa", "shasum": "" }, "require": { @@ -654,7 +587,7 @@ ], "support": { "issues": "https://github.com/Intervention/image-driver-vips/issues", - "source": "https://github.com/Intervention/image-driver-vips/tree/1.0.3" + "source": "https://github.com/Intervention/image-driver-vips/tree/1.0.6" }, "funding": [ { @@ -670,20 +603,87 @@ "type": "ko_fi" } ], - "time": "2025-02-20T14:22:00+00:00" + "time": "2025-06-10T14:30:21+00:00" + }, + { + "name": "james-heinrich/getid3", + "version": "v1.9.23", + "source": { + "type": "git", + "url": "https://github.com/JamesHeinrich/getID3.git", + "reference": "06c7482532ff2b3f9111b011d880ca6699c8542b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JamesHeinrich/getID3/zipball/06c7482532ff2b3f9111b011d880ca6699c8542b", + "reference": "06c7482532ff2b3f9111b011d880ca6699c8542b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.0" + }, + "suggest": { + "ext-SimpleXML": "SimpleXML extension is required to analyze RIFF/WAV/BWF audio files (also requires `ext-libxml`).", + "ext-com_dotnet": "COM extension is required when loading files larger than 2GB on Windows.", + "ext-ctype": "ctype extension is required when loading files larger than 2GB on 32-bit PHP (also on 64-bit PHP on Windows) or executing `getid3_lib::CopyTagsToComments`.", + "ext-dba": "DBA extension is required to use the DBA database as a cache storage.", + "ext-exif": "EXIF extension is required for graphic modules.", + "ext-iconv": "iconv extension is required to work with different character sets (when `ext-mbstring` is not available).", + "ext-json": "JSON extension is required to analyze Apple Quicktime videos.", + "ext-libxml": "libxml extension is required to analyze RIFF/WAV/BWF audio files.", + "ext-mbstring": "mbstring extension is required to work with different character sets.", + "ext-mysql": "MySQL extension is required to use the MySQL database as a cache storage (deprecated in PHP 5.5, removed in PHP >= 7.0, use `ext-mysqli` instead).", + "ext-mysqli": "MySQLi extension is required to use the MySQL database as a cache storage.", + "ext-rar": "RAR extension is required for RAR archive module.", + "ext-sqlite3": "SQLite3 extension is required to use the SQLite3 database as a cache storage.", + "ext-xml": "XML extension is required for graphic modules to analyze the XML metadata.", + "ext-zlib": "Zlib extension is required for archive modules and compressed metadata." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9.x-dev" + } + }, + "autoload": { + "classmap": [ + "getid3/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-1.0-or-later", + "LGPL-3.0-only", + "MPL-2.0" + ], + "description": "PHP script that extracts useful information from popular multimedia file formats", + "homepage": "https://www.getid3.org/", + "keywords": [ + "codecs", + "php", + "tags" + ], + "support": { + "issues": "https://github.com/JamesHeinrich/getID3/issues", + "source": "https://github.com/JamesHeinrich/getID3/tree/v1.9.23" + }, + "time": "2023-10-19T13:18:49+00:00" }, { "name": "jcupitt/vips", - "version": "v2.4.1", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/libvips/php-vips.git", - "reference": "256575d7c5247d4fb3e98bf10ab1e10a571684c7" + "reference": "a54c1cceea581b592a199edd61a7c06f44a24c08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/libvips/php-vips/zipball/256575d7c5247d4fb3e98bf10ab1e10a571684c7", - "reference": "256575d7c5247d4fb3e98bf10ab1e10a571684c7", + "url": "https://api.github.com/repos/libvips/php-vips/zipball/a54c1cceea581b592a199edd61a7c06f44a24c08", + "reference": "a54c1cceea581b592a199edd61a7c06f44a24c08", "shasum": "" }, "require": { @@ -729,9 +729,9 @@ ], "support": { "issues": "https://github.com/libvips/php-vips/issues", - "source": "https://github.com/libvips/php-vips/tree/v2.4.1" + "source": "https://github.com/libvips/php-vips/tree/v2.5.0" }, - "time": "2025-01-13T16:58:09+00:00" + "time": "2025-04-04T17:10:13+00:00" }, { "name": "laravel-zero/phar-updater", @@ -9154,11 +9154,13 @@ "php": "^8.1||^8.2||^8.3||^8.4", "ext-fileinfo": "*", "ext-gd": "*", - "ext-mbstring": "*" + "ext-mbstring": "*", + "ext-ffi": "*" }, "platform-dev": {}, "platform-overrides": { - "php": "8.1.32" + "php": "8.1.32", + "ext-ffi": "3.4.5" }, "plugin-api-version": "2.6.0" } From 6e04b87ce022eed6696bbd9909f5f8d609197266 Mon Sep 17 00:00:00 2001 From: Arnaud Ligny Date: Mon, 1 Sep 2025 00:09:11 +0200 Subject: [PATCH 5/9] Update Image.php --- src/Asset/Image.php | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/Asset/Image.php b/src/Asset/Image.php index 6ec7e0e96..707bbae36 100644 --- a/src/Asset/Image.php +++ b/src/Asset/Image.php @@ -39,16 +39,22 @@ private static function manager(): ImageManager { $driver = null; - if (\extension_loaded('imagick') && class_exists('Imagick')) { - $driver = ImagickDriver::class; - } - // GD is faster than Imagick - if (\extension_loaded('gd') && \function_exists('gd_info')) { - $driver = GdDriver::class; - } + // use Imagick for better quality over GD + //if (\extension_loaded('imagick') && class_exists('Imagick')) { + // $driver = new ImagickDriver(); + //} // libvips is the fastest driver (if FFI is available) if (\extension_loaded('ffi')) { - $driver = VipsDriver::class; + $driver = new VipsDriver(); + try { + $driver->checkHealth(); + } catch (\Exception) { + $driver = null; + } + } + // GD by default + if ($driver === null && \extension_loaded('gd') && \function_exists('gd_info')) { + $driver = new GdDriver(); } if ($driver) { From 7c04517194563931375c30fd9d5a129261b89f0f Mon Sep 17 00:00:00 2001 From: Arnaud Ligny Date: Mon, 1 Sep 2025 00:12:00 +0200 Subject: [PATCH 6/9] Update Image.php --- src/Asset/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Asset/Image.php b/src/Asset/Image.php index 707bbae36..d48e9108d 100644 --- a/src/Asset/Image.php +++ b/src/Asset/Image.php @@ -39,7 +39,7 @@ private static function manager(): ImageManager { $driver = null; - // use Imagick for better quality over GD + // use Imagick for better quality //if (\extension_loaded('imagick') && class_exists('Imagick')) { // $driver = new ImagickDriver(); //} From da1d162d0f7b94e7ee0a74ab1763f83cf2b6fd07 Mon Sep 17 00:00:00 2001 From: Arnaud Ligny Date: Mon, 1 Sep 2025 00:33:36 +0200 Subject: [PATCH 7/9] wip --- src/Asset/Image.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Asset/Image.php b/src/Asset/Image.php index d48e9108d..0a01bf4b3 100644 --- a/src/Asset/Image.php +++ b/src/Asset/Image.php @@ -40,15 +40,15 @@ private static function manager(): ImageManager $driver = null; // use Imagick for better quality - //if (\extension_loaded('imagick') && class_exists('Imagick')) { - // $driver = new ImagickDriver(); - //} + /*if (\extension_loaded('imagick') && class_exists('Imagick')) { + $driver = new ImagickDriver(); + }*/ // libvips is the fastest driver (if FFI is available) if (\extension_loaded('ffi')) { $driver = new VipsDriver(); try { $driver->checkHealth(); - } catch (\Exception) { + } catch (\Intervention\Image\Exceptions\DriverException) { $driver = null; } } From 33eaa9053d976e1c24b92b69547f3ca802aec4b9 Mon Sep 17 00:00:00 2001 From: Arnaud Ligny Date: Mon, 1 Sep 2025 00:46:35 +0200 Subject: [PATCH 8/9] Update Image.php --- src/Asset/Image.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Asset/Image.php b/src/Asset/Image.php index 0a01bf4b3..64e1935ff 100644 --- a/src/Asset/Image.php +++ b/src/Asset/Image.php @@ -45,6 +45,9 @@ private static function manager(): ImageManager }*/ // libvips is the fastest driver (if FFI is available) if (\extension_loaded('ffi')) { + if (!ini_get('ffi.enable')) { + ini_set('ffi.enable', 'true'); + } $driver = new VipsDriver(); try { $driver->checkHealth(); From 16ab923c515a33bc732f85b135ee57d4e6ee377b Mon Sep 17 00:00:00 2001 From: Arnaud Ligny Date: Mon, 1 Sep 2025 00:50:11 +0200 Subject: [PATCH 9/9] Update Image.php --- src/Asset/Image.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Asset/Image.php b/src/Asset/Image.php index 64e1935ff..bd08d13bd 100644 --- a/src/Asset/Image.php +++ b/src/Asset/Image.php @@ -45,9 +45,7 @@ private static function manager(): ImageManager }*/ // libvips is the fastest driver (if FFI is available) if (\extension_loaded('ffi')) { - if (!ini_get('ffi.enable')) { - ini_set('ffi.enable', 'true'); - } + ini_set('ffi.enable', 'true'); $driver = new VipsDriver(); try { $driver->checkHealth();