NAME

Plack::Middleware::Image::Scale - Resize jpeg and png images on the fly

VERSION

version 0.001

SYNOPSIS

builder {
    enable 'ConditionalGET';
    enable 'Image::Scale';
    enable 'Static', path => qr{^/images/};
    $app;
};

DESCRIPTION

This is a trial release. The interface may change.

The conversion is done on the fly, but happens only if the response body is actually read. This means that the normal validation checks (if-modified-since) can be done before expensive conversion actually happens, for example by activating ConditionalGET middleware.

This module should be use in conjunction with a cache that stores and revalidates the entries.

ATTRIBUTES

match_path

match_spec

orig_ext

memory_limit

jpeg_quality

METHODS

call

fetch_orig

body_scaler

image_scale

SEE ALSO

Image::Scale

AUTHOR

Panu Ervamaa <pnu@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Panu Ervamaa.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.