Lua, memc and image_filter, image not resized via lua
razinkov at gmail.com
Sat Sep 15 06:55:55 UTC 2012
You may consider user lua-gd, http://ittner.github.com/lua-gd/, which
works just fine with LuaNginx
We making crop+resize+masking of user-uploaded images in lua handlers
with no problems
On Sat, Sep 15, 2012 at 10:15 AM, agentzh <agentzh at gmail.com> wrote:
> On Fri, Sep 14, 2012 at 3:22 PM, agentzh <agentzh at gmail.com> wrote:
>> This is because the standard ngx_image_filter module's output filter
>> always runs *after* ngx_lua's subrequest capturing filter and there's
>> no easy way to change this order. The response body of your subrequest
>> is captured by ngx_lua *before* the ngx_image_filter's filter gets a
>> chance to run.
> BTW, I've also just written a command-line utility named
> ngx-body-filters that can dump out all the output body filters of any
> running Nginx worker processes (on Linux) in the order they actually
> This tool is part of my Nginx SystemTap Toolkit:
> For example, on my side, the nginx configured with both the ngx_lua
> and ngx_image_filter modules will give me the following result:
> $ ./ngx-body-filters -p 30132
> Tracing 30132 (.../nginx/sbin/nginx)...
> 113 microseconds elapsed in the probe handler.
> where my nginx worker process pid is 30132.
> From this output, we can see clearly that
> ngx_http_lua_capture_body_filter indeed runs before
> So this tool is really handy in determining if there is an issue with
> the nginx output filter running order, which is often not so obvious
> for many users.
> Best regards,
> nginx mailing list
> nginx at nginx.org
с уважением, Разинков Илья
More information about the nginx