Limits & Error Handling
Understand the features scope and learn to handle TwicPics API error codes.
TwicPics only recognizes AVIF, GIF, HEIF, JPEG, PNG, and WebP files as transformable images. Other files will pass through, unaltered.
Whenever something goes wrong, TwicPics will issue an HTTP error with a sensible status code and a short explanation in plain text as a body.
TwicPics will error when:
- there is a syntax error in the manipulation expression
- the authentication identifier is invalid
- the URL of the source image is not well-formed or its protocol is not supported
- the domain of the source image is not registered (see the documentation about domain name registration)
- the source image is unreachable (ie. the
GETrequest to retrieve it resulted in an HTTP error)
- the source image is of an unsupported format (only AVIF, GIF, HEIF, JPEG, PNG and WebP are currently supported)
- the source image, the output image or any intermediate image created while processing the transformations doesn't respect the internal pixel and/or byte size limits of TwicPics (ie. one of the images has a dimension of zero or is "too big")
- a transformation ends up cropping outside of the image (for instance when attempting to crop 500 pixels out of an image that is only 200 pixels wide)