Image delivery and resizing: questions and answers
Short answers about how Talewright serves files: the files host, signed links against public links, headers, caching, byte ranges, image variants made on request with every option and format, which sources can be resized, limits and refusals, use from other websites, responsive images and performance. Each answer links to the section of Image delivery that owns the rule.
How files are served
- Where are files served from?
- Why are files served from a different host than the app?
- Which kinds of addresses does the files host have?
- Which HTTP methods does the files host answer?
- Does the files host use cookies?
- Do I need an API key or a sign-in to open a file link?
- Does the file name at the end of a file address matter?
- How is a file named
a/b.jpgwritten in its links? - What does a refusal from the files host look like?
- Is the files host part of the REST API or of MCP?
- Why does a file link answer
405 METHOD_NOT_ALLOWED? - Does a file link check the file's state on every request?
Signed links and public links
- What is the difference between a signed link and a public link?
- Which link should I put on my website, a signed one or a public one?
- Who can get a signed link to a file?
- Who can open a signed link once it exists?
- Is it safe to publish or forward a signed link?
- What do the signed link variants
original,thumb,previewandplaybackserve? - Does a signed link serve a new version when the file is replaced?
- What makes a signed link stop before its 10 minutes are over?
- Does a signed link work again after its file is restored from the trash?
- Can I tell from a
403whether a signed link expired or was altered? - Why is a file's
thumbnailURLorpreviewURLnull? - Can a restricted file have a signed link?
- What does the answer to a signed link request hold?
- Can I get a signed link to an earlier version of a file?
- Where does an agent get a file's public link?
- Which links does the app itself use to show files?
- Why did a thumbnail in the app fail and then come back?
- May a CDN or shared cache keep the answer of a signed link?
Headers on a file answer
- Which headers does the answer to a file link carry?
- How is the
Content-Typeof a served file decided? - What is the
ETagof a served file? - What does
Content-Dispositionon a file link hold? - What happens to special characters in the name of a downloaded file?
- What is the
Cache-Tagheader on a public link? - Why do file answers carry
nosniffand a sandboxing policy? - What is a thumbnail named when it is saved from a signed link?
Opening in the browser or downloading
- Why does a file link sometimes open in the browser and sometimes download?
- Which file types download from a link?
- Why does my SVG download when I open its link?
- Why does my HEIC photo download and not show?
- Why does a font link download when I open it?
- Does a PDF open in the browser from its link?
- Does a QuickTime
.movfile play in the browser from its link? - Is the rule for opening or downloading different for signed and public links?
Conditional requests
Byte ranges and resuming
- Can I download only part of a file?
- Which forms of the
Rangeheader are understood? - Can I ask for several byte ranges in one request?
- Why does a byte range on a file link answer
416? - What happens with a range that ends past the end of the file?
- What happens with a
Rangeheader the files host does not understand? - How do I resume a download from a public link without mixing two versions?
- Which values of
If-Rangemake the files host serve the range? - Do image variants support byte ranges?
- Do public links of videos answer range requests?
Caching
- Which
Cache-Controldoes a public link send? - Why is there no
immutableon a public link? - I replaced a file. Do I have to change the addresses on my site?
- Why do visitors still see the old picture right after I replaced it?
- Do I have to purge a cache after replacing a public file?
- Which changes drop the copies a CDN keeps of a file?
- Does a CDN keep serving a file after I restrict it?
- Can the files host itself serve a stale file?
- Does the answer of a public link depend on who asks or from where?
- How is the answer of a signed link cached?
- Why does a link that was refused start working without a delay?
- Are public files served through a CDN?
Image variants: the basics
- What is an image variant?
- How do I resize an image by URL?
- Where do the options go in a variant address?
- Do I have to generate image sizes in advance?
- Can I pass image options as a query string, like
?w=640? - How do I build a variant address from a public link?
- Who can open an image variant?
- Does a variant of a public link show the new version after the file is replaced?
- What happens to image variants when the file is made restricted?
- Can I resize an image that is not public?
- Does the app give me variant addresses?
- Is a variant address stable over time?
- Does the file name at the end of a variant address set the output format?
- What is the shortest variant address that works?
The options
- Which options does a variant address take?
- What does the option
wdo? - What does the option
hdo? - What does the option
qdo? - What does
fit=insidedo? - What does
fit=coverdo? - What does the option
fdo? - What does the option
vdo? - What are the default values of the image options?
- Why can I not get an image exactly 700 pixels wide?
- What do I get when I ask for
w=600? - What do I get when I ask for
w=4000? - Is there a
dproption for high-density screens? - Can I blur, sharpen, rotate or filter an image by URL?
- Can I choose which part of the picture a crop keeps?
- Can I crop an image to any shape I like?
- Can I crop or edit an image inside the Talewright app?
- Why is
fit=coverrefused without a height? - Why is
f=jpgrefused? - Why is
W=320orf=WEBPrefused? - What happens when I give the same option twice?
- What do I get when I ask for
q=100? - Does
qchange a PNG variant? - What happens with
v=1orv=4in a variant address? - Why does
w=0fail whenh=0works? - How many digits can a number in the image options have?
- Which quality level should I pick?
- Can I get a variant narrower than 320 pixels?
- Are
wandhexact sizes? - Can I set the background colour for transparent areas?
Canonical addresses and redirects
- What is the canonical address of a variant?
- Why did my variant address answer
308? - Does a short variant address work in an
<img>tag? - How do I avoid the redirect on a variant address?
- What does the
Locationof a variant redirect hold? - Is the redirect of a variant address cached?
- How do I find the canonical address for the options I want?
- Where does
w=700,h=500,fit=cover,f=jpegredirect to? - Can a cross-origin
fetchfollow a variant's redirect?
Formats
- Which image format should I ask for?
- How do I get a WebP version of an image?
- How do I get an AVIF version of an image?
- How do I get a JPEG version of an image?
- How do I get a PNG version of an image?
- What format do I get when I leave
fout? - Can a variant come out as GIF, SVG, TIFF or HEIC?
- What does
f=autodo? - How does
f=autochoose between AVIF and WebP? - Why does
f=autogivecurlor a script WebP? - Can
f=autoever give JPEG or PNG? - Is
f=autostill a redirect when every other option is canonical? - What happens when I ask for
f=aviffrom a browser that cannot show AVIF? - Can a CDN hand an AVIF from
f=autoto a browser that cannot show it? - What does
f=autocost compared with an explicit format? - When is
f=autothe better choice than<picture>? - Why is my PNG variant so much larger than the WebP one?
- Which
Content-Typedoes a variant answer with?
Which images can be resized
- Can I resize a HEIC photo?
- Does a variant of a HEIC photo lose sharpness?
- Does resizing work with animated GIFs?
- How do I show an animated GIF as an animation?
- Can I resize an SVG?
- Which SVG features stop an SVG from being resized?
- Can I resize an SVG that has a
<style>block orstyleattributes? - Which CSS properties can a resizable SVG use?
- Which CSS stops an SVG from being resized?
- Why is my SVG refused because of a CSS comment?
- Are an SVG's
@mediarules and CSS variables applied in a variant? - Can a resizable SVG be animated with CSS?
- Which SVG elements can a resizable SVG use?
- Can an SVG that references an external image or font be resized?
- My SVG cannot be resized. Does its public link still work?
- Can I get an image variant of a PDF, a video or a Photoshop file?
- Can I resize a raw photo, an ICO or a font file?
- Can I resize or transcode a video by URL?
- Is the type that decides whether a file can be resized taken from its name?
- Can I resize a
thumborpreviewsigned link again? - Can WebP and AVIF originals be resized and converted?
- Why does a variant address answer
404while the original link works?
What a variant looks like
- Why did my image not get bigger when I asked for a larger width?
- How do I know the real pixel size of a variant?
- Are the proportions of my image kept when it is resized?
- Do I get exactly the size I asked for with
fit=cover? - Is a photo taken sideways turned upright in a variant?
- Do
wandhapply to a rotated photo before or after it is turned upright? - Does a variant keep the photo's EXIF and camera data?
- Is transparency kept when an image is resized?
- What happens to a transparent PNG served as JPEG?
Variant answers
- Which headers does a variant answer carry?
- What does
X-Image-Cache: missorhitmean? - Is the first request for a new variant slower?
- Does a variant download or show when I open its address?
- Can I send
HEADto a variant address? - Do variants answer
304 Not Modified? - Is a variant's
ETagthe same as the original's? - What happens when many visitors ask for the same new variant at once?
- How are variants of a public link cached?
Limits and refusals
- In what order is a request for a variant checked?
- Why do nonsense options on an unknown public link answer
404and not422? - Why does a very tall picture fail at full width and work at a smaller one?
- Can
fit=coverrun into the limit on the size of a variant? - Can a very large picture fail as PNG and work as WebP?
- Does the public link of an original over 64 MiB still work?
- Can a damaged image file be resized?
- Does a
503on a variant mean something is wrong with my file? - Do original files keep working while the resizer is busy or down?
- Why do some variants answer
503when I request many new ones at once? - Is a
503from the resizer cached? - Does a browser retry an
<img>whose variant failed? - How do I keep my page from showing a broken image when a variant fails?
- What do I do when a render keeps timing out?
- Do the limits on originals apply to a variant that already exists?
- Why does a variant of a gallery or ZIP address answer
422? - What does a variant of an expired signed link answer?
Using images and fonts on another website
- Can I use a public link as the source of an image on my website?
- Is hotlinking a public file from another site allowed?
- Can I limit which websites may embed my public files?
- Which CORS headers does a public link send?
- Can a script on another site
fetcha public file? - Why does my
fetchof a public link fail withcredentials: "include"? - Which response headers can a script on another site read?
- Can a script on another site read
X-Image-WidthandX-Image-Height? - What does a preflight (
OPTIONS) on a public link answer? - Does a preflight tell whether a public link exists?
- Can I draw a public image on a
<canvas>and read the canvas back? - Can a script on another website read my private files?
- Can a script on another site read why a public link failed?
- Can I load a web font from Talewright?
- How do I write the
@font-facerule for a font served by Talewright? - Why does a font preload need
crossorigin? - What happens on my site when I replace a font file with a new version?
- Can I use a public link as a CSS background image?
- Can I use a public video link in a
<video>tag? - How long may a browser remember the preflight of a public link?
Responsive images
- How do I make a responsive image with
srcset? - Which widths should I list in
srcset? - Why should I leave out
srcsetsteps above the original's width? - How do I write
srcsetwhen the variant addresses contain commas? - How do I serve AVIF with WebP and JPEG fallbacks?
- How do I keep the page from jumping while an image loads?
- How do I make a square thumbnail?
- How do I find out the original's width and height?