You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fixed Timeout in readme, 30 ~> 60 (h2non#340)
* Fix invalid parameters "-path-prefix" (h2non#344)
* fix: small errors in docs (h2non#346)
* fix: use proper formatter for usage template (h2non#347)
Co-authored-by: Mads Moeller <[email protected]>
* Add Cloud Run Button (h2non#362)
* Delete app.json
* Update README.md
* Update README.md
* updated docker builder OS to go version 1.17 (h2non#371)
* fix(readme): remove gocard obsolete badge
* feat(readme): update placeholder description
* fix(readme): update fly deploy tutorial
* fix(docs): allowed-origins examples h2non#333
* memory leak issue fixed with jemalloc (h2non#381)
* exposed palette from GET endpoints (h2non#380)
* Updated Dockerfile (h2non#384)
1. Changed base image to bullseye
2. The updated base image contains an updated version of libjemalloc too, so building from source is no longer necessary
3. Updated libvips version too
* Added dev container (h2non#385)
* Added dev container
* Removed irrelevant lines
* allow speed from get (h2non#383)
* allow speed from get
* updating the version to use effor param in libvips
* Return with and heigh of the generated images (h2non#382)
* Return with and heigh of the generated images
Use case:
When using the fit image transformation, it is helpful to know the size
of the resulting image without having to either read the image locally
or do another request to the info endpoint.
Used in: nextcloud/server#24166
Signed-off-by: Carl Schwan <[email protected]>
* Make mimetype support always return true
* Add command line option to enable this feature
Signed-off-by: Carl Schwan <[email protected]>
* refactor: remove deprecated X- prefix in response headers
Co-authored-by: Tom <[email protected]>
* Decompression exploit check (h2non#404)
* Bump bimg version to 1.1.7
* Add decompression bomb exploit check
* Update README with new flag
* Fix tests
* Fix typos (h2non#405)
Found via `codespell -S .git`.
---------
Co-authored-by: Julian <[email protected]>
Co-authored-by: liuxu <[email protected]>
Co-authored-by: 0xflotus <[email protected]>
Co-authored-by: Mads Moeller <[email protected]>
Co-authored-by: Mads Moeller <[email protected]>
Co-authored-by: James Ward <[email protected]>
Co-authored-by: Angelo Girardi <[email protected]>
Co-authored-by: Tom <[email protected]>
Co-authored-by: Vaibhav Sharma <[email protected]>
Co-authored-by: Alessandro (Ale) Segala <[email protected]>
Co-authored-by: Vaibhav Sharma <[email protected]>
Co-authored-by: Carl Schwan <[email protected]>
Co-authored-by: SeaaaaaSharp <[email protected]>
Co-authored-by: Kian-Meng Ang <[email protected]>
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.217.4/containers/go/.devcontainer/base.Dockerfile
2
+
3
+
# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.16, 1.17, 1-bullseye, 1.16-bullseye, 1.17-bullseye, 1-buster, 1.16-buster, 1.17-buster
4
+
ARG VARIANT="1.17-bullseye"
5
+
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
**[Fast](#benchmarks) HTTP [microservice](http://microservices.io/patterns/microservices.html)** written in Go **for high-level image processing** backed by [bimg](https://github.com/h2non/bimg) and [libvips](https://github.com/jcupitt/libvips). `imaginary` can be used as private or public HTTP service for massive image processing with first-class support for [Docker](#docker) & [Fly.io](#flyio).
4
4
It's almost dependency-free and only uses [`net/http`](http://golang.org/pkg/net/http/) native package without additional abstractions for better [performance](#performance).
@@ -10,7 +10,7 @@ with additional optional features such as **API token authorization**, **URL sig
10
10
11
11
`imaginary` is able to output images as JPEG, PNG and WEBP formats, including transparent conversion across them.
12
12
13
-
`imaginary`also optionally **supports image placeholder fallback mechanism** in case of image processing error or server error of any nature, therefore an image will be always returned by the server in terms of HTTP response body and content MIME type, even in case of error, matching the expected image size and format transparently.
13
+
`imaginary` optionally **supports image placeholder fallback mechanism** in case of image processing error or server error of any nature, hence an image will be always returned by imaginary even in case of error, trying to match the requested image size and format type transparently. The error details will be provided in the response HTTP header `Error` field serialized as JSON.
14
14
15
15
`imaginary` uses internally `libvips`, a powerful and efficient library written in C for fast image processing
16
16
which requires a [low memory footprint](https://github.com/libvips/libvips/wiki/Benchmarks)
@@ -27,6 +27,7 @@ To get started, take a look the [installation](#installation) steps, [usage](#co
27
27
-[Docker](#docker)
28
28
-[Fly.io](#flyio)
29
29
-[Cloud Foundry](#cloudfoundry)
30
+
-[Google Cloud Run](#google-cloud-run)
30
31
-[Recommended resources](#recommended-resources)
31
32
-[Production notes](#production-notes)
32
33
-[Scalability](#scalability)
@@ -162,7 +163,7 @@ services:
162
163
163
164
Deploy imaginary in seconds close to your users in [Fly.io](https://fly.io) cloud by clicking on the button below:
[](https://deploy.cloud.run)
209
+
203
210
### Recommended resources
204
211
205
212
Given the multithreaded native nature of Go, in terms of CPUs, most cores means more concurrency and therefore, a better performance can be achieved.
@@ -222,7 +229,7 @@ $ imaginary -concurrency 20
222
229
223
230
### Memory issues
224
231
225
-
In case you are experiencing any persistent unreleased memory issues in your deployment, you can try passing this environemnt variables to `imaginary`:
232
+
In case you are experiencing any persistent unreleased memory issues in your deployment, you can try passing this environment variables to `imaginary`:
-enable-placeholder Enable image response placeholder to be used in case of error [default: false]
337
344
-enable-auth-forwarding Forwards X-Forward-Authorization or Authorization header to the image source server. -enable-url-source flag must be defined. Tip: secure your server from public access to prevent attack vectors
@@ -340,6 +347,7 @@ Options:
340
347
-url-signature-key The URL signature key (32 characters minimum)
341
348
-allowed-origins <urls> Restrict remote image source processing to certain origins (separated by commas). Note: Origins are validated against host *AND* path.
342
349
-max-allowed-size <bytes> Restrict maximum size of http image source (in bytes)
350
+
-max-allowed-resolution <megapixels> Restrict maximum resolution of the image [default: 18.0]
343
351
-certfile <path> TLS certificate file path
344
352
-keyfile <path> TLS private key file path
345
353
-authorization <value> Defines a constant Authorization header value passed to all the image source servers. -enable-url-source flag must be defined. This overwrites authorization headers forwarding behavior via X-Forward-Authorization
@@ -422,7 +430,7 @@ This feature is particularly useful to protect against multiple image operations
|`--allowed-origins *.amazonaws.com`|`www.notaws.comimages/image.png`| NOT VALID (no matching host) |
486
-
|`--allowed-origins *.amazonaws.com, foo.amazonaws.com/some-bucket/`|`bar.amazonaws.com/some-other-bucket/image.png`| VALID (matches first condition but not second) |
|`-allowed-origins https://*.amazonaws.com`|`www.notaws.comimages/image.png`| NOT VALID (no matching host) |
494
+
|`-allowed-origins https://*.amazonaws.com, foo.amazonaws.com/some-bucket/`|`bar.amazonaws.com/some-other-bucket/image.png`| VALID (matches first condition but not second) |
487
495
488
496
### Authorization
489
497
@@ -565,6 +573,7 @@ Image measures are always in pixels, unless otherwise indicated.
565
573
-**areaheight**`int` - Width area to extract. Example: `300`
566
574
-**quality**`int` - JPEG image quality between 1-100. Defaults to `80`
0 commit comments