Spatie image getWidth() function doesn't work

34 Views Asked by At

I am using laravel 10 and xampp

i have installed "spatie/image": "^3.3", with docs

https://spatie.be/docs/image/v3/installation-and-setup

I have added code from docs

https://spatie.be/docs/image/v3/usage/retrieving-properties

$size = Image::load('storage/62/conversions/IMG_20230424_131655p-page.jpg')->getWidth();

and i am getting this error

Imagick::getImageProperties not implemented

So i thought "i don't have Imagick installed" so installed step by step from

https://phpandmysql.com/extras/install-imagemagick-and-imagick-xampp/

but i am using 8.2 php and least version was made for 8.1 php

Now when i check phpmyinfo i don't see that imagick is installed but when i had check that imagick is installed in cmd when I checked in cmd whether imagick was installed, I got the answer that it was installed

when i use php artisan serve I got errors

   WARN  PHP Warning: PHP Startup: imagick: Unable to initialize module.  

   WARN  Module compiled with module API=(somenumeridkitsimportant).  

   WARN  PHP compiled with module API=(somenumeridkitsimportant).     

   WARN  These options need to match.  

   WARN  in Unknown on line 0.  

   INFO  Server running on [http://127.0.0.1:8000].  
0

There are 0 best solutions below