SCSS Functions and Features

Often you may want to include images or videos from your database into your SCSS. One typical example is using an uploaded image as a background-image: url() value. To do this, you can use these special functions:

imageURL()

This function allows you to provide the ID of an image, video or profile from your database and will return a dynamic REST API url for accessing the image.

For more information on these URLs, we suggest you check the get image endpoint documented here:
https://rest.docs.qik.dev/#endpoint-get-image

The arguments for this function should be provided as below:
imageURL($id, $width, $height, $format, $quality, $upscale, $crop)


Example Usage

.example {
  background-image: imageURL('64d974556e6ac244f40a3b6b', 1920, 1080, 'png');
}

Published output would be:

.example {
  background-image: url('https://api.qik.dev/image/64d974556e6ac244f40a3b6b?w=1920&h=1080&f=png&access_token=<theapplicationstoken>');
}