Ron Rise 0271d575ab
Some checks failed
Go Tests / build (1.22.x) (push) Failing after 5m25s
added dependabot
2024-05-07 14:20:54 -04:00
2024-05-07 14:20:54 -04:00
2024-05-07 14:14:28 -04:00
2024-04-23 08:52:59 -04:00
2024-04-23 08:55:22 -04:00
2024-04-23 08:59:55 -04:00
2024-05-07 14:14:28 -04:00
2024-05-07 14:14:28 -04:00
2024-04-23 16:29:15 -04:00
2024-04-23 08:57:30 -04:00
2024-04-23 09:03:06 -04:00

img-proxy url generator

img proxy docs

build

you can optionally hard code a path prefix on build

go build --ldflags="-X 'github.com/siteworxpro/img-proxy-url-generator/generator.PathPrefix=s3://mybucket'"

config file

params

[img-proxy]

  • key sha256 hmac key
  • salt sha256 hmac salt
  • host img-proxy server hostname
  • encryption-key aes encryption key
  • plain-url send plain filename. bypasses all encoding
[img-proxy]
key=2c...47
salt=27...27
host=https://i.fooo.com
encryption-key=1c...0b
plain-url=1

usage

generate a plain url with an insecure signature

[img-proxy]
host=https://i.fooo.com
plain-url=1
./imgproxy --image "local:///my-super-image.png"

https://i.fooo.com/insecure/raw:1/plain/local:///my-super-image.png

generate a plain url with a signature

[img-proxy]
host=https://i.fooo.com
key=23...a4
salt=3f...4a
plain-url=1
./imgproxy --image "local:///my-super-image.png"

https://i.fooo.com/g0ociV0BWaK8JPXtkNsGxdK8IFHbVYczrcmiiv5T9pk/raw:1/plain/local://my-super-image.png

generate a hmac url with a signature

[img-proxy]
host=https://i.fooo.com
key=23...a4
salt=3f...4a
./imgproxy --image "local:///my-super-image.png"

https://i.fooo.com/NIColt6GBjtbquJXAtEMMsptARPw0CdeduEcu-S9Voc/raw:1/bG9jYWw6Ly9teS1zdXBlci1pbWFnZS5wbmc

generate an encrypted url

[img-proxy]
host=https://i.fooo.com
key=23...a4
salt=3f...4a
encryption-key=1c...0b
./imgproxy --image "local:///my-super-image.png"

https://i.fooo.com/m3YtaMSgL86qCnfKCnS2i9_vLRmJSogdBx1o86cWbuc/raw:1/enc/F6FAWktv2SAFe5UQwMme0pB6JwKQJVtTI_6Xx-PUfKANdQk0pD1I13NPnv0CvkFT

generate a url with params

./imgproxy --image "local:///my-super-image.png" -p h:200 -p rot:90

https://i.fooo.com/q-CfgLiuHTXDiZg7vBsUbZB3nkhzfsPgNrK0x20b878/h:200/rot:90/sm:1/enc/DrSKPtr8JkWx_Bf-vuxDTXRXfhrkZKTlPoQE61BzMfG2Mj1mD0qnthPq_Sfk8giv

generate a url with a specified format

./imgproxy --image "local:///my-super-image.png" --format bmp -p h:200

https://i.fooo.com/UMkz4OUNw6P9ShLdewuvW3ValMgCt263vZzU5gN57WQ/h:200/sm:1/enc/ECYxMeVBTjRxB7F-jdQ7W_-Fnv4YbmSJIKie-Hdtxd9vsmEKjU1YuWVSzdN97Mod.bmp
Description
No description provided
Readme Apache-2.0 779 KiB
v1.5.1 Latest
2025-05-20 22:35:19 +00:00
Languages
Go 97.7%
Shell 1.3%
Dockerfile 1%