Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Sergey Alexandrovich
    @DarthSim
    @wieseljonas Cool! Glad to hear that! If it's not a secret, I'd like to hear some details about your impressions and costs savings after the migration. A short call would be awesome if you have some free time ;)
    Szabolcs Kelemen
    @SzabKel
    Hello! Following the instructions (https://docs.imgproxy.net/#/installation?id=from-the-source) i tried to install imgproxy on ubuntu server 18.04.3 LTS. Executing the last command yields an error:
    szabkel@testbench:~$ CGO_LDFLAGS_ALLOW="-s|-w" go get -f -u github.com/imgproxy/imgproxy
    # github.com/imgproxy/imgproxy
    /tmp/go-build402231393/b001/_x006.o: In function `vips_trim':
    go/src/github.com/imgproxy/imgproxy/vips.c:421: undefined reference to `vips_find_trim'
    collect2: error: ld returned 1 exit status
    # github.com/imgproxy/imgproxy
    vips.c: In function ‘vips_trim’:
    vips.c:421:7: warning: implicit declaration of function ‘vips_find_trim’; did you mean ‘vips_trim’? [-Wimplicit-function-declaration]
       if (vips_find_trim(tmp, &left, &top, &width, &height, "background", bga, "threshold", threshold, NULL)) {
           ^~~~~~~~~~~~~~
           vips_trim
    What am I doing wrong?
    Szabolcs Kelemen
    @SzabKel
    szabkel@testbench:~$ go version go version go1.13.4 linux/amd64
    Sergey Alexandrovich
    @DarthSim
    Which version of vips do you use?
    Szabolcs Kelemen
    @SzabKel
    How can I check? I just followed the guide
    It is a clean ubuntu server install, added the PPA with sudo add-apt-repository ppa:dhor/myway
    szabkel@testbench:~$ vips --version
    vips-8.5.7-Mon Oct 15 18:23:06 UTC 2018
    Sergey Alexandrovich
    @DarthSim
    Oh, seems like 8.5 does’t have trim. I’ll fix the build, but the trim option won’t work with old vips versions.
    Szabolcs Kelemen
    @SzabKel
    I updated to 8.9 and it installed imgproxy.
    jonathandanforth
    @jonathandanforth
    Hi there - I'm trying to deploy on Heroku (never used it before) and the fields for IMGPROXY_KEY and IMGPROXY_SALT are empty. Should these be populated automatically or do I generate them somehow?
    Sergey Alexandrovich
    @DarthSim
    Yup, that’s right, they’re empty by default. You can set your own key/salt pair if you like.
    Szabolcs Kelemen
    @SzabKel
    Do I need to setup anything besides what is written in the guide for imgproxy to use S3? I created my credentials file in my home and set the env variables:
    szabkel@testbench:~/.aws$ export IMGPROXY_S3_REGION=eu-central-1
    szabkel@testbench:~/.aws$ export IMGPROXY_USE_S3=true
    yet, when i try to request a file I get: unsupported protocol sheme \"s3""
    and http 404 - Source image is unreachable
    Szabolcs Kelemen
    @SzabKel
    scheme*
    Sergey Alexandrovich
    @DarthSim
    That's pretty weird since IMGPROXY_USE_S3 enables s3 scheme no matter what. Just to be sure: do you run imgproxy in the same shell session where you set these variables?
    Szabolcs Kelemen
    @SzabKel
    hmm, I did not, I used two different shells
    worked in the same session, sorry
    My other question is, do you have any wiki or article detailing how should I go about caching? If I store ~4-5MB images in S3, a request to a 300x300 thumbnail to imgproxy takes 1-3 seconds.
    image.png
    Szabolcs Kelemen
    @SzabKel
    It seems like imgproxy still downloads it every time
    Sergey Alexandrovich
    @DarthSim

    Yes, it does. It's a good practice to put a caching server or CDN in front of imgproxy. It looks like you use AWS, so CloudFront seems to be a good fit for you.

    Also, you can configure a local cache with nginx with something like this:

    location / {
        proxy_cache all;
        proxy_cache_valid 200 24h;
        proxy_force_ranges on;
    
        proxy_cache_lock on;
        proxy_cache_lock_timeout 10s;
        proxy_cache_lock_age 200s;
        proxy_cache_use_stale updating;
    
        proxy_pass  "http://127.0.0.1:8080";
        proxy_redirect off;
    }
    Szabolcs Kelemen
    @SzabKel
    I see, thanks
    Даниил Пронин
    @Grawl
    hello. I trying to use imgproxy during development using Docker image. I run it with snippet from docs:
    docker run -p 8080:8080 -it darthsim/imgproxy
    but if I change outer port (I have another app on 8080) and run it like this:
    docker run -p 8989:8080 -it darthsim/imgproxy
    I have this error on any request:
    dial tcp 127.0.0.1:8989: connect: connection refused
    Даниил Пронин
    @Grawl

    I think it's because URLs requested have outer port 8989 but imgproxy itself run on 8080 in container. full error looks like this

    WARNING [2020-03-05T03:34:49Z] Completed in 6.919457ms /icCa7JceBjX1kcLyqHc6KRIdy1hZ0J7rXU8yMEV7pLY/rs:fill:460:260:0/g:ce/dpr:1.5/aHR0cDovL2xvY2FsaG9zdDo4OTg5L3NYaS1KZHpJRDJnZ0VIMmJDa0NoR2t4WmdWbEdpT2FkOUZ3N013YWVpQ2svcnM6ZmlsbDo0NjA6MjYwOjAvZzpjZS9kcHI6MS9hSFIwY0hNNkx5OXdiMnRoZEdsdExuSjFMM1Z3Ykc5aFpITXZjRzl6ZEhNdk1qQXlNQzB3TVM4eE5UYzROREEzTVRFMVh6RXhNaTVxY0dj  request_id=sSfGc-gYnhpPpJouuAIuO method=GET status=404 error="Get \"http://localhost:8989/sXi-JdzID2ggEH2bCkChGkxZgVlGiOad9Fw7MwaeiCk/rs:fill:460:260:0/g:ce/dpr:1/aHR0cHM6Ly9wb2thdGltLnJ1L3VwbG9hZHMvcG9zdHMvMjAyMC0wMS8xNTc4NDA3MTE1XzExMi5qcGc\": dial tcp 127.0.0.1:8989: connect: connection refused"

    I tried to change IMGPROXY_BIND

    docker run \
        -p 8989:8989 \
        -e IMGPROXY_BIND=127.0.0.1:8989 \
        -it darthsim/imgproxy

    but imgproxy does not see any requests. I think I do something wrong

    Sergey Alexandrovich
    @DarthSim
    Hi. Sorry for the delay. You went in the right direction, but did not go far enough :) Try this:
    docker run \
        -p 8989:8989 \
        -e IMGPROXY_BIND=":8989" \
        -it darthsim/imgproxy
    Sergey Alexandrovich
    @DarthSim
    When you bind imgproxy to 127.0.0.1, it listens only to the request from the loopback network.
    Даниил Пронин
    @Grawl
    thank you!
    John Koehl
    @jkoehl
    Curious if there are any pointers in scaling up imgproxy in Kubernetes? Thing such as setting up memory / CPU limits. And curious in general how much concurrency we would want to push through each instance of imgproxy.
    Sergey Alexandrovich
    @DarthSim
    I'd recommend scaling imgproxy horizontally rather than vertically. 2 requests per core is a good concurrency.
    Dmitrii Raev
    @draev
    Hello to everyone!
    Does anybody know, how could I store a resized image to be used next time?
    Sergey Alexandrovich
    @DarthSim
    The whole point of imgproxy is to not store results. Why do you need to do so?
    Dmitrii Raev
    @draev
    to avoid resizing image at each call. It looks normal to resize original only once, and not each time for High Traffic Volume
    Sergey Alexandrovich
    @DarthSim
    Just put caching server or CDN like CloudFront in front of imgproxy. I gave an example of nginx config somewhere in this chat
    Dmitrii Raev
    @draev
    @DarthSim thank you for your responses.
    I have one more problem with imageproxy, and I don't know how to handle it :)
    I need to resize a 386 × 218 to 283x283. With fit resize option I get the image with not expected sizes (283 × 164) and with fill resize option, the image sizes are good (283x283) but image is cropped :(
    What I am making wrong ?
    Irina Nazarova
    @inazarova_twitter
    @draev hey! I help Sergey with imgproxy a little bit. How do you want to resize a horizontal image into a square without cropping it? Do you want to distort it?
    Dmitrii Raev
    @draev
    square could be done with filling by larger side with white background for example
    Sergey Alexandrovich
    @DarthSim
    Looks like you want to use the extend option https://docs.imgproxy.net/#/generating_the_url_advanced?id=extend.
    Dmitrii Raev
    @draev
    yes, thank you very much! it is exact what I am looking for :)
    Guido Celada
    @celadaguido
    Hello guys, how are you? im having trouble with getting "Last-Modified" header, i've setup a new transport (Swift) but i can't seem to return the header "Last-Modified" of the original image.
    Guido Celada
    @celadaguido
    mm , maybe i can setup the etag feature, let me try.
    Sergey Alexandrovich
    @DarthSim
    Currently, imgproxy doesn't return Last-Modified of the source image. There's a feature request about this imgproxy/imgproxy#348
    Guido Celada
    @celadaguido
    Allright thank you ! I'll use the etag instead.
    Guido Celada
    @celadaguido
    oh i see, the etag its going to be different for each resize of the same pic, maybe ill implement the feature instead.
    Guido Celada
    @celadaguido
    its not very hard, you have to add it to the ctx in download.go and then add it to the response in processing_handler.go.
    Sergey Alexandrovich
    @DarthSim
    It's not that simple, but the direction is correct
    Dmitrii Raev
    @draev
    Hello guys! Anybody knows what is the price for PRO version and how to get it ?
    Irina Nazarova
    @inazarova_twitter
    @draev hey! We have two different licenses: Standard and Extended. You can answer questions here https://evilmartians.typeform.com/to/Fb2btG to get a quote for your use case.