Skip to content
New site — Virtual Media Folders now has its own home. Visit vmf.soderlind.no →

Using

Tachyon provides a simple HTTP interface in the form of:

https://{tachyon-domain}/my/image/path.png?w=100&h=80

The path, without its leading slash, is the Object Key in the Origin. A first /tachyon/ segment is removed, as in Tachyon. Originals under a Private Prefix also need the SigV4 presign WordPress generates, either as presign= or as raw X-Amz-* parameters.

Send X-WebP: 1 to get WebP output without the webp argument.

URL ArgTypeDescription
wNumberMax width of the image.
hNumberMax height of the image.
qualityNumber, 0-100Image quality.
resizeString, “w,h”A comma separated string of the target width and height in pixels. Crops the image.
crop_strategyString, “smart”, “entropy”, “attention”There are 3 automatic cropping strategies for use with resize:
  • attention: good results, ~70% slower
  • entropy: mediocre results, ~30% slower
  • smart: best results, ~50% slower
gravityStringAlternative to crop_strategy. Crops are made from the center of the image by default, passing one of “north”, “northeast”, “east”, “southeast”, “south”, “southwest”, “west”, “northwest” or “center” will crop from that edge.
fitString, “w,h”A comma separated string of the target maximum width and height. Does not crop the image.
cropBoolean|String, “x,y,w,h”Crop an image by percentages x-offset, y-offset, width and height (x,y,w,h). Percentages are used so that you don’t need to recalculate the cropping when transforming the image in other ways such as resizing it. You can crop by pixel values too by appending px to the values. crop=160px,160px,788px,788px takes a 788 by 788 pixel square starting at 160 by 160.
zoomNumberZooms the image by the specified amount for high DPI displays. zoom=2 produces an image twice the size specified in w, h, fit or resize. The quality is automatically reduced to keep file sizes roughly equivalent to the non-zoomed image unless the quality argument is passed.
webpBoolean, 1Force WebP format.
lbString, “w,h”Add letterboxing effect to images, by scaling them to width, height while maintaining the aspect ratio and filling the rest with black or background.
backgroundStringLetterbox colour as lowercase hex, escaped: %23ff0000 or %23f00. Anything else, including colour names and unescaped hex, falls back to black (Tachyon v3.0.8 behaviour).
CaseStatusBody and headers
Success200Image; Content-Type of the output format, Cache-Control: max-age=31536000 (or the presign’s remaining validity), Last-Modified
Missing Original, Private Prefix without a valid presign, expired presign404File not found., Content-Type: text/html
Invalid arguments (e.g. crop outside the image), undecodable Original, processing failure500Internal Server Error, Cache-Control: no-store
HTTP Origin failure other than 403/404502Bad Gateway, Cache-Control: no-store

See the README for the documented differences from Tachyon v3.0.8.