Symfony - Working with images?

Asked

Viewed 82 times

1

I need to create an image with php , I would like to know if Simfony has a library or something already included in it to work with GD/Imagemagick functions. I’ve been researching and I’ve seen "Liipimaginebundle", but it seems to me quite limited, for example, I don’t know if I can create an image with this library. Does anyone know about any library or even about this Liipimaginebundle? Thanks.

2 answers

0

you don’t necessarily need to use Symfony’s Buttons. In Symfony you can install components via Composer and just use the Class in your Controller.

Third-party image manipulation components: Intervention Imanee

You install with Composer:

composer require imanee/imanee

E Uses within the method in the Controller:

$imanee = new \Imanee('test.jpg');
echo $imanee->thumbnail(200, 200, true)
    ->output();

NOTE: To instantiate Classes in Symfony it is necessary to use "\".

0

For image processing there are several libraries available. The Liipimaginebundle has as its general purpose to facilitate the task of serving images. In your case, for the creation of images, I believe that it will not serve.

I did a quick search and found the phpixie/image which seemed to me to be very simple and functional. The library Gregwar/image also seems to me a great option.

I have not used any of them, so my evaluation is limited to API and available documentation.

If you want to search more libraries, the packagist has several options.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.