Introduction on WebP Server Documentationhttps://docs.webp.sh/Recent content in Introduction on WebP Server DocumentationHugo -- gohugo.ioHeadershttps://docs.webp.sh/headers/Mon, 01 Jan 0001 00:00:00 +0000https://docs.webp.sh/headers/ Headers # WebP Server Go will render the following header in response: etag Example: W/&quot;87328-49BF2BCE&quot; This header is produced by W/&quot;&lt;content length&gt;-&lt;CRC Checksum of the file&gt;&quot; x-compression-rate Example: 0.87 This header is produced by size(webp_image)/size(original_image), if the value is bigger than 1, it means the converted webp image is bigger than the original image, hence the original image is return to the visitor.Benchmarkhttps://docs.webp.sh/benchmark/Mon, 01 Jan 0001 00:00:00 +0000https://docs.webp.sh/benchmark/Benchmark # Benchmarks are done with AMD Ryzen 7 PRO 5850U with a customized image set: totaling 2.6 GB. Around 80% of the images were taken with a Sony A7 camera, with file sizes averaging around 15 MiB. The remaining 20% were smaller images with sizes ranging from 1 MiB to 5 MiB. [Nova@WebP webp_bench]$ du -ch pics 17M pics/pics/MC 6.1M pics/pics/Wallpapers 2.0M pics/pics/elk 151M pics/pics/TUNA-SFD 32M pics/pics/ThinkPad 322M pics/pics 5.Buildhttps://docs.webp.sh/build/Mon, 01 Jan 0001 00:00:00 +0000https://docs.webp.sh/build/Build WebP Server Go # Install latest version of golang, enable go module, install dependencies described under Usage with Binary(Advanced) and clone the repo, then&hellip; make Due to the limitations of webp module, you can&rsquo;t cross compile this tool. But the binary will work instantly on your platform and archUse with CDNhttps://docs.webp.sh/cdn/Mon, 01 Jan 0001 00:00:00 +0000https://docs.webp.sh/cdn/Use with CDN # If you use CDN(such as Cloudflare) for your website, since WebP Server Go will render different image on different devices, its vital to make sure CDN doesn&rsquo;t cache our outputs, for example, Cloudflare will cache all the images(by extension) from your website, which will cache the webp format of the image and use it for all visitors, this cached image cannot be shown on some old Safari browser.Comparisonshttps://docs.webp.sh/comparisons/Mon, 01 Jan 0001 00:00:00 +0000https://docs.webp.sh/comparisons/ Comparison between different versions # Feature Go Node Java Python Convert images on the fly ✔ ✔ ✔ ✔ Image prefetch ✔ Image resize/crop ✔ URL mapping ✔ ✔ Compression rate display ✔ AVIF Support ✔ JXL Support ✔Contributorshttps://docs.webp.sh/contributors/Mon, 01 Jan 0001 00:00:00 +0000https://docs.webp.sh/contributors/ Contributors # In alphabetical order GitHub Username GitHub ID Work BennyThink BennyThink WebP Server Go, WebP Server Python BlueCocoa BlueCocoa WebP Server Rust BugFest bugfest WebP Server Go Keshane KnifeC WebP Server Java, Artwork Digitalize Langel llanc WebP Server Go Mathieu Aubin mathieu-aubin WebP Server Go muzi muzi502 WebP Server Go Nova Kwok n0vad3v WebP Server Go, WebP Server Node ,webp.sh Tuki tukideng Artwork Design Vadim fffilimonov WebP Server GoRelated Articleshttps://docs.webp.sh/related_articles/Mon, 01 Jan 0001 00:00:00 +0000https://docs.webp.sh/related_articles/ Related Articles # 让站点图片加载速度更快——引入 WebP Server 无缝转换图片为 WebP 个人网站无缝切换图片到 webp 优雅的让 Halo 支持 webp 图片输出 让图片飞起来 oh-my-webp.sh ! [Go 开源推荐] webp_server_go —— 可自动将 jpg, jpeg, PNG 图片进行压缩的 WebP 服务 使用 WebP Server Go 优化图片提升网站加载速度 20220228 Docker安装webps|优雅的让Halo支持webp 切换网站图片格式到webp js将图片转换为base64_为网站添加图片 WebP 自动转换功能 【WebP Server】灵活实现站点图片平滑过渡WebP 为网站添加图片 WebP 自动转换功能 - 知乎 用「WebP Server Go」优化你的图片 - 初之音 使用webp-server-go来无痛高效的优化网站图片 从jpg和png自动转成webp 并删除exif信息 - Q58 能将图片转为WebP格式的WebP Server GoUse with Docker(Recommended)https://docs.webp.sh/usage/usage/Mon, 01 Jan 0001 00:00:00 +0000https://docs.webp.sh/usage/usage/Usage with Docker(Recommended) # We&rsquo;ve build docker images on hub.docker.com and ghcr.io. If you want to run webp-server insider docker container without using docker-compose.yml and without limiting the resources it will use, you can run the command below: DockerHub docker run -d -p 3333:3333 -v /path/to/pics:/opt/pics --name webp-server webpsh/webp-server-go ghcr.io docker run -d -p 3333:3333 -v /path/to/pics:/opt/pics --name webp-server ghcr.io/webp-sh/webp_server_go The path path/to/pics is your images serving in local. The path /opt/pics is currently unable modify because it&rsquo;s defined in the config.Configurationhttps://docs.webp.sh/usage/configuration/Mon, 01 Jan 0001 00:00:00 +0000https://docs.webp.sh/usage/configuration/Configuration # This is the unified documentation, please use the latest version of WebP Server Go if possible as some configuration might not be available in previous versions. WebP Server Go can be configured by the following ways: config.json file Environment variables Priority: Environment variables &gt; config.json file. Configuration changelog # MAX_CACHE_SIZE is added at version 0.12.0 EXTRA_PARAMS_CROP_INTERESTING is added at version 0.11.2 STRIP_METADATA, CONVERT_TYPES is added at version 0.Use with Binary(Advanced)https://docs.webp.sh/usage/usage-with-binary/Mon, 01 Jan 0001 00:00:00 +0000https://docs.webp.sh/usage/usage-with-binary/Usage with Binary(Advanced) # Note: There is a potential memory leak problem with this server and remains unsolved, we recommend using Docker to mitigate this problem, refer to Docker. Related discussion: https://github.com/webp-sh/webp_server_go/issues/75 Download or build the binary # Download the webp-server-go from release page. Install dependencies # Install libvips on your machine, more info here. macOS Run brew install vips pkg-config Ubuntu Run apt install libvips-dev Fedora Run dnf install vips-devel If you don&rsquo;t like to hassle around with your system, so do us, why not have a try using Docker?Log verbosityhttps://docs.webp.sh/usage/verbosity/Mon, 01 Jan 0001 00:00:00 +0000https://docs.webp.sh/usage/verbosity/ Log verbosity # You can control log level using --verbosity flag on startup, e,g: ./webp-server --verbosity 0 0 = silent (no log messages) 1 = error (error messages only) 2 = warn (error messages and warnings only) 3 = info (error messages, warnings and normal activity logs) 4 = debug (all info plus additional messages for debugging)<link>https://docs.webp.sh/usage/extra-params/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.webp.sh/usage/extra-params/</guid><description>Extra Parameters # You can turn it on by setting &quot;ENABLE_EXTRA_PARAMS&quot;: true in config.json. Currently, we support the following params: height width max_width max_height both are in px. Example on height and width # http://some-host.tld/path/to/nasa.jpg http://some-host.tld/path/to/nasa.jpg?width=200 If you set both width and height, your image will be cropped using attention crop by default maintain your width-height ratio, like this: http://some-host.tld/path/to/origin.png http://some-host.tld/path/to/origin.png?width=400&amp;height=800 http://some-host.tld/path/to/origin.png?width=400&amp;height=400 attention crop: look for features likely to draw human attention.</description></item><item><title/><link>https://docs.webp.sh/usage/healthz/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.webp.sh/usage/healthz/</guid><description>Healthz # There is a /healthz endpoint that can be used to check if the server is up and running. You can use this endpoint for liveness probe. It returns a 200 status code if the server is up and running. curl localhost:3333/healthz -v * Trying 127.0.0.1:3333... * Connected to localhost (127.0.0.1) port 3333 (#0) &gt; GET /healthz HTTP/1.1 &gt; Host: localhost:3333 &gt; User-Agent: curl/8.0.1 &gt; Accept: */* &gt; &lt; HTTP/1.</description></item><item><title/><link>https://docs.webp.sh/usage/multipath/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.webp.sh/usage/multipath/</guid><description>MultiPath # Starting from version 0.9.9, we&rsquo;re supporting multipath, thanks to contribution by @bugfest ❤️. If you&rsquo;d like to use multiple path for serving different images, you can use the new config.json format. You can specify additional paths mappings under IMG_MAP dict. IMG_MAP&rsquo;s keys are URIs or Hosts names will be translated to their corresponding mapped value. It works in two different modes: URI map: Keys have the form /.</description></item><item><title/><link>https://docs.webp.sh/usage/prefetch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.webp.sh/usage/prefetch/</guid><description>Prefetch # Prefetch is useful if you&rsquo;d like to have all your images converted in advance, especially suitable for large amount of images with high traffic volume, using prefetch will convert your images and cache the converted images, hence future requests will not consume computing power. Start server with prefetch # Start WebP Server with prefetch enabled will convert all your images to WebP on startup in background, the following things will happen in this mode:</description></item></channel></rss>