X-Accel-Redirect cannot work with a filter?

Hi fellows,

My scenario is request a image by its id and respond a fixed
size(150*200) image, such as

http://foo.com/image?id=1

a backend is used for query file’s path in DB by id

My configuration is:
step 1), pass the request to the backend:

location /image{
proxy_pass backend;
}

step 2), in the backend, set the ’ X-Accel-Redirect ', for example, "
X-Accel-Redirect :/internal/test.jpg"

setp 3), respond the file and aslo do image_filter

location /internal {
internal;
image_filter   resize  150 200;
alias /datastore/;
}

But it doesn’t work. I guess X-Accel-Redirect cannot work with a
filter, am i right?
If so, how can I make this scenario work?

Thanks!

Posted at Nginx Forum:

I have a similar setup,

is there a way to use image_filter after the backend responded with
“X-Accel-Redirect” header ?
if so, how can i pass the parameters i.e. to resize the image: width and
hight ?

cheers
andre

Posted at Nginx Forum: