librelist archives

« back to archive

Adaptive Images for Ruby?

Adaptive Images for Ruby?

From:
Jake Subs
Date:
2012-04-30 @ 11:35
There's a rather nifty PHP/Apache solution to the thorny issue of
adaptive images in responsive web design, by Matt Wilcox:
http://adaptive-images.com/
https://github.com/MattWilcox/Adaptive-Images

How easy(!) would it be to create a Ruby/Sinatra version?

Yours, hopefully...

-- 
[~] Jake Rayson
[w] www.jrayson.co.uk
[e] subs@growdigital.org
[t] @growdigital

Re: [nesta] Adaptive Images for Ruby?

From:
Graham Ashton
Date:
2012-04-30 @ 14:16
On 30 Apr 2012, at 12:35, Jake Subs <subs@growdigital.org> wrote:

> There's a rather nifty PHP/Apache solution to the thorny issue of
> adaptive images in responsive web design, by Matt Wilcox:
> http://adaptive-images.com/
> https://github.com/MattWilcox/Adaptive-Images
> 
> How easy(!) would it be to create a Ruby/Sinatra version?

From a quick scan, it looks as though it's the kind of thing that'd be 
well suited to being rack middleware. So not that hard. Somebody may 
already have done oneā€¦

Re: [nesta] Adaptive Images for Ruby?

From:
Nathanael D. Jones
Date:
2012-04-30 @ 14:22
The only one I know of for Ruby is Dragonfly, but it seems to be poorly
maintained: https://github.com/markevans/dragonfly

Here's my 2 cents, as the author of imageresizing.net (maintaining that
library is my full time job, actually..)

Dynamic image scaling is a hard problem on any platform. And unlike pretty
much every other coding task, I think it's actually a bit easier on
Windows. Ironically, Windows' built-in imaging libraries are significantly
faster at image resizing than FreeImage, for example....

If you *can* find a hosted solution in your region, that's what I'd
suggest. Something that pulls images from an Amazon S3 bucket and
integrates with a good edge caching solution would be best.

It's best to keep your image processing server separate from your primary
server - it's an easy way to prevent it as an attack vector, and ensure the
massive RAM requirements don't interfere with primary operations.

I know sencha.io offers some kind of primitive hosted solution, which may
meet your needs.... but other than that I don't know of any hosted
solutions available *yet*...

On Mon, Apr 30, 2012 at 7:35 AM, Jake Subs <subs@growdigital.org> wrote:

> There's a rather nifty PHP/Apache solution to the thorny issue of
> adaptive images in responsive web design, by Matt Wilcox:
> http://adaptive-images.com/
> https://github.com/MattWilcox/Adaptive-Images
>
> How easy(!) would it be to create a Ruby/Sinatra version?
>
> Yours, hopefully...
>
> --
> [~] Jake Rayson
> [w] www.jrayson.co.uk
> [e] subs@growdigital.org
> [t] @growdigital
>