The complete reference for TwicPics placeholders API.
Every manipulation can target a placeholder. In that case, TwicPics will compute the final dimensions consequential to the transformations then respond with an SVG image of these dimensions that also displays said dimensions.
Alternative URL format
Using placeholders requires using the following alternative API URL format:
<source_image> is a placeholder expression of the form
https://<sub>.twic.pics/v1/resize=640x480/placeholder:auto will generate a 640 pixels wide per 480 pixels high gray colored placeholder.
Working with absolute URLs for paths
If you used absolute URLs as paths in your domain configuration, you can use:
https:URLs, provided they have corresponding paths in your domain
- relative URLs, provided they convert to absolute URLs that have corresponding paths in your domain
Specifying the dimensions of a placeholder is optional. Syntax is
height are strictly positive numbers.
It is perfectly valid to create a placeholder with dimensions and no color. In that case, the default colors will be used.
Keep in mind the final dimensions of a placeholder depends on the transformations applied to it. So
resize=(1/10)s/placeholder:auto will give a placeholder which dimensions are 192 per 108, a tenth of the default ones.
Specifying the colors of a placeholder is mandatory unless dimensions have been specified. Syntax is
background are color expressions to be used for the text and the background of the image respectively.
autoas the color expression and TwicPics will default to an unobtrusive gray color scheme.