Images and video URLs
Images and video are served from https://cdn.wink.travel. The URL rules are strict: a width, or any
other option, that is not on the list is refused with 400. The CDN does not round it to the nearest
size. This page lists what you can ask for, so you do not find out by getting a 400.
You build the URL from the public id of an image or video. The examples below use home/404, an image
Wink owns, so you can paste them into a browser. {publicId} stands for the id of your own image.
Widths
Section titled “Widths”The only widths that exist are:
| Width in px |
|---|
| 160 |
| 320 |
| 640 |
| 1024 |
| 1920 |
| 2560 |
This holds for w and h on images, and for w on video stills. Any other value is 400.
How to choose. Take the size the image is shown at, in CSS pixels, multiply it by the device pixel
ratio, and use the smallest width that is at least that. An image shown 300 px wide on a phone with a
pixel ratio of 2 needs 600 px, so ask for w=640.
You can also pass dpr=1, 2 or 3 and keep w at the displayed size: w=320&dpr=2 is a 640 px
image. dpr needs w or h.
The delivered image is never more than 2560 px on a side, and is never enlarged beyond the original.
The 2560 px limit counts the width or height you ask for, the side an aspect ratio works out, a border
and dpr. w=1920&dpr=2 would be 3840 px, so it is 400.
Images
Section titled “Images”GET https://cdn.wink.travel/img/{publicId}?w=640HEAD works too. Any other method is 405.
{publicId}is everything after/img/and may contain slashes, for examplehotel-123/photo-abc. Use letters, digits,_,.and-in each segment. Do not percent-encode it, and do not leave a segment empty. An id is at most 512 characters.- No options returns the original, capped at 2560 px, in a format chosen from the request’s
Acceptheader (f=auto, the default). The response carriesVary: Accept. - Option names and values are case-sensitive and must match the lists below exactly. An option you do not
see here (including tracking parameters such as
utm_source,fbclidandgclid), a repeated option or an empty value is400. Strip tracking parameters before you request. - The old form
/img/{publicId}/{size}.jpgno longer exists. A last path segment made only of digits, optionally followed by.jpg,.pngor.webp, is400.
https://cdn.wink.travel/img/home/404?w=640https://cdn.wink.travel/img/home/404?w=320&dpr=2https://cdn.wink.travel/img/home/404?w=640&ar=16:9&c=fillhttps://cdn.wink.travel/img/home/404?w=640&f=webpOptions
Section titled “Options”| Option | Accepted values | Default |
|---|---|---|
w, h | 160, 320, 640, 1024, 1920, 2560 | the original, up to 2560 px |
ar | 1:1, 4:3, 3:2, 16:9, 3:4, 2:3, 9:16, 4:5, 21:11 | none |
c | limit, fit, fill, lfill, scale, pad, thumb | limit |
g | auto, center, face, faces, north, north_east, east, south_east, south, south_west, west, north_west | none |
q | auto, auto:best, auto:good, auto:eco, auto:low, or 30 to 100 in steps of 10 | auto:best |
f | auto, jpg, png, webp, avif | auto |
dpr | 1, 2, 3 | 1 |
blur | 100 to 2000 in steps of 100 | none |
grayscale | 1 | off |
sharpen | 50 to 400 in steps of 50 | none |
brightness, contrast, saturation | -90 to 90 in steps of 10 | none |
r | 8, 16, 32, 64, max | none |
b | auto, white, black | none |
bo | a width from 1 to 16, an underscore and white or black, for example bo=4_white | none |
An option set to its default is the same as leaving it out, and the order of the options does not matter.
Some options only work together:
fill,lfill,thumbandpadneed bothwandh, orar.arneeds exactly one ofwandh, and one of those four crops. The default croplimitdoes not produce a ratio.scaleneeds bothwandh.- Any
cneedsw,horar.gonly works withfill,lfill,thumborpad, andbonly withpad. ris not allowed withf=jpg, because the corners need transparency.boneedsworh.
f=auto picks a format your client accepts. An explicit f is not negotiated: you get that format, and
the response has no Vary header.
Video stills
Section titled “Video stills”A still is one frame of a video, delivered as an image:
GET https://cdn.wink.travel/vid/{publicId}?w=640&f=jpgA still accepts only w (the same six widths), q (as for images) and f (jpg, png, webp or
avif; jpg if you leave it out). The frame is the one at 0 seconds, and you cannot pick another. With no
w, you get the frame at its own size, up to 2560 px. Any other option is 400, including h, ar, c,
dpr, effects, and a video format such as f=mp4, f=webm or f=auto.
GET https://cdn.wink.travel/vid/{publicId}This streams the video and supports Range requests, so players can seek.
To get a shorter file for sharing, ask for a clip with v. A clip is rendered the first time someone asks
for it, then stored, so the first request waits a few seconds.
v | Fits into |
|---|---|
preview | 1280 px wide, never enlarged |
social-wide | 1200 × 630 |
social-square | 1080 × 1080 |
social-portrait | 1080 × 1350 |
social-story | 1080 × 1920 |
There are no free-form video widths. v cannot be combined with w, q or f. A clip keeps the
video’s proportions inside the box without padding, so it can be smaller than the box in one direction.
A video longer than 60 seconds has no clips.
Static files
Section titled “Static files”GET https://cdn.wink.travel/static/{publicId}This serves a file exactly as stored, with no options, so SVG logos arrive as SVG. It only covers Wink’s
own brand and marketing assets (logos, email headers and similar). It is not a place for your own files,
and any query string is 400.
What you want, which URL
Section titled “What you want, which URL”| You want | URL |
|---|---|
| A small thumbnail | /img/{publicId}?w=160 |
| A card image about 300 px wide | /img/{publicId}?w=320 (or w=640 for sharper screens) |
| A hero image | /img/{publicId}?w=1920 |
| The same image, sharp on a retina screen | /img/{publicId}?w=640&dpr=2, which is a 1280 px image |
| A 16:9 card with the subject kept in frame | /img/{publicId}?w=640&ar=16:9&c=fill&g=auto |
| A square avatar | /img/{publicId}?w=320&h=320&c=fill&g=faces |
| The smallest file for the same picture | add f=webp or f=avif, or leave f out and let the browser choose |
| The poster image of a video | /vid/{publicId}?w=1024&f=jpg |
Caching and cross-origin use
Section titled “Caching and cross-origin use”- Successful responses are cached for a year (
Cache-Control: public, max-age=31536000, immutable). A public id is never overwritten, so a new picture gets a new id. - Successful
/img/,/vid/and/static/responses sendAccess-Control-Allow-Origin: *andCross-Origin-Resource-Policy: cross-origin, and so do image and still errors. You can draw an image onto a canvas (crossOrigin="anonymous") orfetchit from your own origin. 404means the id does not exist. There is no placeholder image.
If you get a 400
Section titled “If you get a 400”Check these in order:
- The width or height is not on the list. Use one of 160, 320, 640, 1024, 1920 or 2560.
w=300andw=3000both fail. - An option you did not mean to send. Unknown names, tracking parameters such as
utm_*, repeated options, empty values and values in the wrong case (c=FILL,W=640) are all refused. Build the query from a fixed list instead of passing the page’s query string through. arwithout a size, or without a crop. Givearexactly one ofwandh, andc=fill,lfill,thumborpad.w=640&ar=16:9fails, and so doesar=16:9&w=640&h=320.- A crop without the sizes it needs.
c=fill&w=640needshas well, or anar. - The result would be over 2560 px on a side. Count
dpr, a border, and the sidearworks out:w=1920&dpr=2andw=1920&ar=9:16&c=fillboth fail. - A value off its steps.
q=85,blur=150anddpr=4are refused, as isr=16withf=jpg. - The public id. A last segment of only digits is read as the retired
{size}form (/img/photo/1024is400). An id with a dot in its last segment, such asprod/photo.v2, needs an explicitf(f=jpg) because the dot is otherwise read as a file extension. Percent signs, spaces and empty segments are refused. 400 Image options are restricted. Wink can temporarily limit delivery towandfalone. Requests that use only those two options still work.
Two other statuses you may see: 404 is an id that does not exist, and 429 with Retry-After: 60
means one address has asked for many images the CDN had not yet produced. Wait a minute and retry.
