symfony / ux

Symfony UX initiative: a JavaScript ecosystem for Symfony
https://ux.symfony.com/
MIT License
781 stars 274 forks source link

[LiveComponent] [cropperjs] Doesnt work from pathfile #1932

Open BigOHenry opened 1 week ago

BigOHenry commented 1 week ago

Hello, i have "symfony/ux-cropperjs": "^2.18" and symfony 7.11 (php 8.3.7). I have got problem with getting cropped image after form post (error Unable to init from given binary data.). Front-end part works fine.

I am trying to figure it out, but i ended with even this three lines of code not working:

$path = '/var/www/evo/var/tmp/uploads/avatar_66756f82d2f3b9.34598694.jpg'
$crop = $cropper->createCrop($path);
$image = $crop->getCroppedThumbnail(400, 300);

And still getting this error: obrazek

smnandre commented 1 week ago

There seems to be a problem with GD trying to read the file.

Is the file readable? Can you read it from your controller ?

BigOHenry commented 1 week ago

Yes file is readable

BigOHenry commented 1 week ago

And got another error when uploaded the PNG file: obrazek

I tried to update intervention/image to new version (3.7), but there are requirements for version ^2.5 (2.7.2 - mid 2021, its pretty old).

smnandre commented 5 days ago

Could you create the smallest reproducer possible, with the same versions you use in composer ? So we can install/test and understand what is not working as expected / create a fix ?

BigOHenry commented 3 days ago

I am so sorry, but i dont have spare time :-(