Edit images via the URL

To edit images before they are served, you don’t need to do anything complicated. You can simply adjust the image output using parameters in the URL.

Adjust width

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

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

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

Create thumbnail

To load a square image:

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

In this example, the image has been resized to fit, and any sides are filled with white space.

Crop

To load a square crop of an image, also include a crop parameter:

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

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

Adjust quality

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

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

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

Add blur

To add blur, use the B parameter, as shown below:

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

In this example, a value of 1 was used for blur; you can use 0 through 3.