Editing images via the url

To edit images before they are served, you don't need to do complicated things. You can simply use parameters in the URL to modify the output of the image.

If you rather watch a video about how you can edit images via the url: Watch it on our YouTube channel

Adjust width

To crop an image to a width of 400 pixels use, for example:

https://content.afosto.io/5719193282412544/quicq/pexels-andrea-piacquadio-3768125.jpg?w=400

batch-image.png

In the above example, the height of the image is variable, only the width is fixed.

Thumbnail creation

To load a square image:

https://content.afosto.io/5719193282412544/quicq/pexels-andrea-piacquadio-3768125.jpg?w=400&h=400

batch-image.png

In this example, the image was made to fit and any sides were filled with white space.

Cropping / Cutting Images

To load a square crop from an image, also send a crop parameter:

https://content.afosto.io/5719193282412544/quicq/pexels-andrea-piacquadio-3768125.jpg?w=400&h=400&c=1

batch-image.png

The largest possible crop is now taken from the image (as little as possible is cut off to get it square)

Quality adjustment

To adjust the quality and thus the size (in bytes) of the image, use the Q parameter, as below:

https://content.afosto.io/5719193282412544/quicq/pexels-andrea-piacquadio-3768125.jpg?w=400&q=10

batch-image.png

In this example, the quality has been reduced to 10%

Add Blur

To add blur, use the B, as below:

https://content.afosto.io/5719193282412544/quicq/pexels-andrea-piacquadio-3768125.jpg?w=400&b=1

batch-image.png

In this example, a value of 1 has been used for blur; you can use 0 to 3.