https://hayabusa.io/foo/img1.webp Original Images S3 or HTTP server foo bar http://xxxxxxx/img1.png • Fetch image • Check changes • Processed image data • Metadata Process image Config
User-Agent, Accept ◦ Cache used only when accessed by the same URL, User-Agent and Accept header ◦ Result image differs according to user’s environment GET https://hayabusa.io/foo/img1.auto png, webp… progressive / baseline (jpg)
LRU cache • Cache metadata ◦ Size ▪ for JPEG progressive/baseline decision ◦ Header (etag) ▪ Use for detection of original image changes ◦ Cache time, etc.
Reduces file sizes often as much as 70% ◦ optipng ▪ PNG lossless compression ◦ zopfli ▪ Better deflate algorithm ◦ gifsicle ▪ Compression for gif ◦ jpegrecompress ▪ Compress JPEG by re-encoding to the smallest size while keeping visual quality
automatically. “Images of file size 10K and over have a better chance of being smaller when using the progressive JPEG format” X-axis: original image size Y-axis: difference when subtracting progressive from baseline sizes quoted from: http://www.bookofspeed.com/chapter5.html
values in directory setting 3. Default values in origin server setting 4. Plug-in defaults https://hayabusa.io/foo/img1.width-200.optipng-3.pngquant(color-256).・・・.png https://hayabusa.io/foo/img1.width-200.png simplify URL with defaults