

We have just seen the original picture above, let’s add a blur factor of 20 and round the borders: Īnd that’s all, working with Filestack is very easy!Īs we usually do, we include the uploader thanks to pick, a function from Filestack.1. Filestack allows the options blur to get a value within. The last choice is to add blurred-rounded borders to the picture. We can crop its face by setting crop=d:: :/hOv6CUMRTErojO1feJUA So for instance, providing coordinates of (0,0,100,100) instructs Filestack to start the cropping from the top-left pixel and the size of the rectangle will be 100×100.įor instance, let’s consider the snake picture again: To crop a picture we need to tell filestack the crop origin, a x,y pixel coordinate and the width and height of the cropped part. The way we tell Filestack’s API to apply a certain image manipulation is the same as before, just add the parameters in the URL. Have you noticed the difference? The first picture maintains the proportions so the height is not 300px, while the second it exactly 400×300 as we added fit:crop. However, we can still add another parameter, fit:crop so that any parts of the image that don’t fit within the boundaries gets removed: However Filestack tries to maintain the original proportions so the height may not be processed. So, the complete url for a picture uploaded on Filestack could be If you take a look at the UI, you see that the first option in the form allows user to resize the picture:Īccording to the documentation, we can customize the picture URL by adding for instance /resize=width:500,height:500. So now I can add an uploader button in my React components. Right before the bundle.js created by Webpack! Then, in the entry point of my app, /src/index.js I set the key: tKey('YOUR_API_KEY')

This is something that I usually take for granted and don’t cover in the articles but it’s in fact a necessary step. The complete app is available on my github! Filestack Integrationīefore diggin’ into the Image Manipulation section of Filestack I want you to remember that to start using Filestack we need to include it in our index.html file and set the API key.

I customized some basic Bootstrap tutorial, added React to handle the views and communicate with the json-server, our mock API to retrieve and add new pictures. In fact it doesn’t take too much time to write this sample app: For now, let’s take a look a the UI: Homepage
