Optimize third-party images

To prevent other parties from abusing your Quicq CDN to optimize their images you can only load images from the source you have specified. However, if Quicq is set up like that you are not able to optimize images from other websites (which you would like to load on your site).

This feature requires you to use a key to create what is called a signature. You use the key, known only to you, to create a signature specific to 1 image (URL).

Step 1

Retrieve the key from Quicq, it may look like this: f61739f5a93ddab5da5104cf3bf3367815ab1db7654a8c47e521a5beef7fc

Step 2

In this example we are going to optimize https://content.afosto.io/5719193282412544/brand/logo.png. You do this by creating a sha256 hash of the URL of the image, combined with a . (dot) and finally the signature f61739f5a93ddab5...

In bash:

echo -n https://content.afosto.io/5719193282412544/brand/logo.png.f61739f5a93ddab5da5104cf3bf3367815ab1db7654a8c47e521a5beef7fc | shasum -a 256

Step 3

Use the resulting key in URL to load the image: