When you add an image to your Typeform account, we resize it for different uses on different devices and to improve the load speed of your typeforms. This resizing applies to all file formats: JPEG, PNG, and GIF.
Three endpoints in the Create API allow you to retrieve images by size: Retrieve image by size, Retrieve background by size, and Retrieve choice image by size.
To specify the image size you want to retrieve, add a path parameter to your request URL. For example, to retrieve the mobile-sized version of an image that you want to use to illustrate a question, your request URL will look like this:
https://images.typeform.com/images/{image_id}/image/mobile
Available image size values depend on the endpoint you're using. Also, the image size values apply different scaling methods. Read on for details about the scaling methods and the image size values that are available for each endpoint.
Images are resized based on one of three scaling methods:
The scaling method is applied based on the image size value you select.
Use the GET https://images.typeform.com/images/{image_id}/image/{size}
endpoint to retrieve images for illustrating questions, welcome screens, and thank you screens.
Here are the valid values for {size}
, with their scaling methods and dimensions:
Value | Scaling method | Maximum width (in pixels) | Maximum Height (in pixels) |
---|---|---|---|
default | Width | 800 | Not applicable |
mobile | Width | 460 | Not applicable |
thumbnail | Thumbnail | 80 | 50 |
Use the GET https://images.typeform.com/images/{image_id}/background/{size}
endpoint to retrieve images you want to use as a background.
Here are the valid values for {size}
, with their scaling methods and dimensions:
Value | Scaling method | Maximum width (in pixels) | Maximum Height (in pixels) |
---|---|---|---|
default | Fit | 1680 | 1050 |
tablet | Fit | 1024 | 768 |
mobile | Fit | 480 | 320 |
thumbnail | Fit | 80 | 50 |
NOTE: Images used to personalize typeform backgrounds are scaled and cropped from a top-left alignment to make sure they fill the screen properly.
Use the GET https://images.typeform.com/images/{image_id}/choice/{size}
endpoint to retrieve images to use as picture_choice
question options.
Here are the valid values for {size}
, with their scaling methods and dimensions:
Value | Scaling method | Maximum width (in pixels) | Maximum Height (in pixels) |
---|---|---|---|
default | Fit | 230 | 230 |
thumbnail | Thumbnail | 80 | 80 |
supersize | Thumbnail | 310 | 233 |
supermobile | Thumbnail | 238 | 164 |
supersizefit | Fit | 310 | 233 |
supermobilefit | Fit | 238 | 164 |
Take a look at some walkthroughs for the Create API, then check out the Create reference for more endpoints.