Guide to generating your first image variation with query string integration
Query string is a key value pair that you can append to a URL. In this particular use case, we can use it to encode modification that needs to be applied to a template.
By creating query string URL for your template, you can create variation of the image by just simply modifying the query string.
For example, the link below has two query strings - title and src. It generates the following image.
By simply changing the query string title and src to something different, you could generate a new variation like below,
Second variation using the same template
We will walk you through to create your first image variation.
Unlike other integration, this is the simplest form of integration. All you need is your template. If you don't have one, choose from our selection of presets.
From the drop down menu, select "Query String URL". Alternatively, you can select "Console" and navigate to "Integrations" > "Query String".
You should now see the Query String wizard
Query String Integration wizard
Our query strings are appended to this base URL. Base URL lets us know which template you want to create variation for.
This allows us to block any requests that come from unauthorized domains.
You can specify multiple origins, they must be separated by comma. Wilcard (*) character is allowed. Here's few examples.
Here you would customize which query string belongs to which object to be modified.
In this example, we create two query strings -
imagewhich should change the
titlewhich should change the
Don't forget to save it you're done!
If you're unsure which object belongs to which item on your template, simply go to the "Test API" and consult the table for the right information.
Test API shows all the available modifications for your specific template
To test your query string, copy the URL from previous step and modify the query strings properly.
The above links give me,
The first image will take a few seconds to generate. If the modifications remain the same, the subsequent call to the image will retrieve the image from cache.