Skip to main content

Generates URL for imgproxy image processing server

Project description

Generates URL for imgproxy image processing server

Use following command line to generate IMGPROXY_KEY and IMGPROXY_SALT

echo $(xxd -g 2 -l 64 -p /dev/random | tr -d '\n')
from mkimgproxy import ImgProxy

IMGPROXY_URL = "http://my-imgproxy-server/path"
IMGPROXY_KEY = "9cbc4f564037858e5b9f2304f8540aa606943bddeaecb00a0b4a498092d0d65c079e291d3a2ddceafd23f1a29bb914fbf91a8464515826bb6a9f609800781182"
IMGPROXY_SALT = "3dae9fbe7138431c57d59625d19175901df23786b1b8b6c65a39a0ac26f344809478bb3c7f6a838a1a45dbe123f85a16d8ce74c2f595cbf61d12a8470c588201"

imgProxy = ImgProxy(IMGPROXY_KEY, IMGPROXY_SALT, IMGPROXY_URL)
resizedImageUrl = imgProxy.generate("http://example.com/images/curiosity.jpg", {
    "s": "800:500", "rt": "fit", "g": "sm", "q": 70, "sm": "true"}, "jpeg")

print(resizedImageUrl)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkimgproxy-0.4.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkimgproxy-0.4-py2.py3-none-any.whl (2.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file mkimgproxy-0.4.tar.gz.

File metadata

  • Download URL: mkimgproxy-0.4.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for mkimgproxy-0.4.tar.gz
Algorithm Hash digest
SHA256 dc1b732223a7479bbc7cb65afb6c50ebf915563ce3b827c4380ef93f9a1eaf58
MD5 7941308a4ab02219ece8083c367bab34
BLAKE2b-256 95440da263e0a3b496c9cc68fe1cd3d367d3488f1e5fcf6428318adba311d0d8

See more details on using hashes here.

File details

Details for the file mkimgproxy-0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: mkimgproxy-0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for mkimgproxy-0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ec35edaf53d34131ea1dee3d9e5f5fa0cef3c6882ef9a8d8df71b7ff4ce61b81
MD5 15e44456b379bee99828f3fef40d0f02
BLAKE2b-256 1624033ed4a7653eb9c6540bb2bf30fba8a3d1adce1219592a46b27d2e0bef1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page