1

Is there an Apache module or similar that will allow me to serve images and varying sizes?

We have a a lot of images (gif, jpeg and png) that are all around 150x150, some are bigger but all are 1:1 in size.

I would like to be able to serve images like this:

http://images.ourserver.com/image/path/realimage.png?50x50 http://images.ourserver.com/image/path/realimage.png?100x100

And get back a resized version of the original file. A cache of the resized file should also be created.

This sounds like a problem that should have already been solved.

(We run currently run CentOS servers but all options will be considered.)

EEAA
  • 108,414
  • 18
  • 172
  • 242
Richard Stelling
  • 1,467
  • 2
  • 19
  • 25

2 Answers2

3

I've never used it myself but I found Apache::Imager:Resize which seems to do what you want and has a few links to related modules.

uesp
  • 3,384
  • 1
  • 17
  • 16
1

I don't know of an apache module, but it would be fairly trivial to implement using php, gd, and a very simple set of rewrite rules.

Details on that implementation would probably be best asked over on SO.

EEAA
  • 108,414
  • 18
  • 172
  • 242