Skip to content

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.

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.

GET https://cdn.wink.travel/img/{publicId}?w=640

HEAD works too. Any other method is 405.

  • {publicId} is everything after /img/ and may contain slashes, for example hotel-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 Accept header (f=auto, the default). The response carries Vary: 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, fbclid and gclid), a repeated option or an empty value is 400. Strip tracking parameters before you request.
  • The old form /img/{publicId}/{size}.jpg no longer exists. A last path segment made only of digits, optionally followed by .jpg, .png or .webp, is 400.
https://cdn.wink.travel/img/home/404?w=640
https://cdn.wink.travel/img/home/404?w=320&dpr=2
https://cdn.wink.travel/img/home/404?w=640&ar=16:9&c=fill
https://cdn.wink.travel/img/home/404?w=640&f=webp
OptionAccepted valuesDefault
w, h160, 320, 640, 1024, 1920, 2560the original, up to 2560 px
ar1:1, 4:3, 3:2, 16:9, 3:4, 2:3, 9:16, 4:5, 21:11none
climit, fit, fill, lfill, scale, pad, thumblimit
gauto, center, face, faces, north, north_east, east, south_east, south, south_west, west, north_westnone
qauto, auto:best, auto:good, auto:eco, auto:low, or 30 to 100 in steps of 10auto:best
fauto, jpg, png, webp, avifauto
dpr1, 2, 31
blur100 to 2000 in steps of 100none
grayscale1off
sharpen50 to 400 in steps of 50none
brightness, contrast, saturation-90 to 90 in steps of 10none
r8, 16, 32, 64, maxnone
bauto, white, blacknone
boa width from 1 to 16, an underscore and white or black, for example bo=4_whitenone

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, thumb and pad need both w and h, or ar.
  • ar needs exactly one of w and h, and one of those four crops. The default crop limit does not produce a ratio.
  • scale needs both w and h.
  • Any c needs w, h or ar. g only works with fill, lfill, thumb or pad, and b only with pad.
  • r is not allowed with f=jpg, because the corners need transparency. bo needs w or h.

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.

A still is one frame of a video, delivered as an image:

GET https://cdn.wink.travel/vid/{publicId}?w=640&f=jpg

A 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.

vFits into
preview1280 px wide, never enlarged
social-wide1200 × 630
social-square1080 × 1080
social-portrait1080 × 1350
social-story1080 × 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.

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.

You wantURL
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 pictureadd 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
  • 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 send Access-Control-Allow-Origin: * and Cross-Origin-Resource-Policy: cross-origin, and so do image and still errors. You can draw an image onto a canvas (crossOrigin="anonymous") or fetch it from your own origin.
  • 404 means the id does not exist. There is no placeholder image.

Check these in order:

  1. The width or height is not on the list. Use one of 160, 320, 640, 1024, 1920 or 2560. w=300 and w=3000 both fail.
  2. 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.
  3. ar without a size, or without a crop. Give ar exactly one of w and h, and c=fill, lfill, thumb or pad. w=640&ar=16:9 fails, and so does ar=16:9&w=640&h=320.
  4. A crop without the sizes it needs. c=fill&w=640 needs h as well, or an ar.
  5. The result would be over 2560 px on a side. Count dpr, a border, and the side ar works out: w=1920&dpr=2 and w=1920&ar=9:16&c=fill both fail.
  6. A value off its steps. q=85, blur=150 and dpr=4 are refused, as is r=16 with f=jpg.
  7. The public id. A last segment of only digits is read as the retired {size} form (/img/photo/1024 is 400). An id with a dot in its last segment, such as prod/photo.v2, needs an explicit f (f=jpg) because the dot is otherwise read as a file extension. Percent signs, spaces and empty segments are refused.
  8. 400 Image options are restricted. Wink can temporarily limit delivery to w and f alone. 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.