Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

split19's avatar

spatie/image installation php 8

I have PHP 8.0.7 running on Valet. When I run composer require spatie/image I get this error:

  Problem 1
    - league/glide 2.0.x-dev requires php ^5.4 | ^7.0 -> your php version (8.0.7) does not satisfy that requirement.
    - league/glide 2.0.0 requires league/flysystem ^2.0 -> found league/flysystem[2.0.0-alpha.1, ..., 2.x-dev] but the package is fixed to 1.1.5 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - spatie/image 2.0.0 requires league/glide ^2.0 -> satisfiable by league/glide[2.0.0, 2.0.x-dev].
    - Root composer.json requires spatie/image 2 -> satisfiable by spatie/image[2.0.0].

I'm not very knowledgeable in resolving composer issues. As far as I know, spatie/image supports PHP 8. But it looks like it's trying to pull in league/glide 2.0.x-dev for some reason, which does not support PHP 8. I think the latest version of league/glide does support PHP 8.

Am I doing something wrong? How do I get spatie/image to pull in the latest league/glide? Or is that not what I should be trying to do?

Thanks for your help.

0 likes
10 replies
Snapey's avatar

Looks like actually, flysystem is pegged at 1.15 and needs to be version 2 in order to allow glide 2.0.0 to be installed.

Check your composer.json file. Do you have flysystem specified in there?

neilstee's avatar

composer require spatie/image:1.10.5

2 likes
split19's avatar

I do have the very latest laravel/framework. and i'd prefer to use the latest spatie/image. so, no resolution yet. thanks though.

split19's avatar

@neilstee i couldn't get the latest spatie/image installed, so I took your advice and installed 1.10.5. This worked using the -W flag.

$ composer require spatie/image:1.10.5 -W
./composer.json has been updated
Running composer update spatie/image --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 3 updates, 0 removals
  - Downgrading league/glide (2.0.x-dev e84ef23 => 1.7.0)
  - Downgrading spatie/image (2.0.0 => 1.10.5)
  - Upgrading spatie/temporary-directory (1.3.0 => 2.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 3 updates, 0 removals
  - Syncing league/glide (1.7.0) into cache
  - Upgrading spatie/temporary-directory (1.3.0 => 2.0.0): Extracting archive
  - Downgrading league/glide (2.0.x-dev e84ef23 => 1.7.0): Checking out ae5e267005 from cache
  - Downgrading spatie/image (2.0.0 => 1.10.5): Extracting archive
Generating optimized autoload files
...

i don't know if this is the best approach. maybe Laravel 9 will make these issues go away.

2 likes
split19's avatar

@snapey flysystem is not in my composer.json. I'm building a laravel app, just recently started from a fresh laravel installation. I see in the laravel/framework/composer.json "league/flysystem": "^1.1",

BrooklynJones's avatar

Hi guys!

So currently I'm storing the image path direct on the the row for the specific item. eg. posts has a column called image, and in that column I'm storing the direct image path. But now I'm thinking of instead store a "image id" in the column, and have a lookup table of "images". But I don't know I want to have multipel image tables, like "avatar_images", "post_images" etc. One image table, for all site images, and thumbnails. Does this seems like a good approach ?

https://www.rapidfs.me/

Please or to participate in this conversation.