# \[ANN\] Fleximage v2

**URL:** <https://www.ruby-forum.com/t/ann-fleximage-v2/133984>\
**Category:** Rails\
**Created:** [April 6, 2008, 2:10am UTC](https://www.ruby-forum.com/t/ann-fleximage-v2/133984 "2008-04-06T02:10:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![squeegy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Post date:** [April 6, 2008, 2:10am UTC](https://www.ruby-forum.com/t/ann-fleximage-v2/133984/1 "2008-04-06T02:10:08Z")

</div>

Fleximage is a Rails plugin that tries to make image uploading and  
rendering super easy.

Get Fleximage v2 here

> **[GitHub: Let’s build from here](https://github.com/)**
>
> GitHub is where over 100 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and fea...

* * *

You ever make something, and then look back a few years later and say  
“What the hell was I thinking”? This happened to me recently.  
Fleximage has been quite a useful plugin for me, but under the hood it  
was a mess; the API was cumbersome, and mixing in all the image  
transformations as direct model methods was code smell.

This release represents the 3rd complete rewrite of this code base. The  
first effort was SuperImage. It worked, but it happened almost entirely  
in the controller and made more interesting effects harder. The first  
_Fleximage_ was next introducing more tranformations and @.flexi@ views  
and a good effort to making it more MVC friendly.

So I now present, _Fleximage v2_. The output is very similar, but the  
API and internals are completely different. Here’s some highlights.

- No support for DB stored images, sorry…
- Creation date based master image storage to prevent OS imposed  
directory limits. i.e. /path/to/images/2008/02/06/999.jpg
- Rails 2 formatted resource route friendly
- Magic columns to capture filename and image size
- Image transformation methods are not injected into your model or  
controller at all.
- Image operations now happen via Operator class that refactor each  
transformation into their own encapsulated class.
- Easily output JPG, PNG, or GIF based on request format.
- Simple acts\_as\_\* style model activation rather than using a cumbersome  
inheritance method
- Side by side file upload or URL fields for easy uploading.
- Uploading will only ever replace you image file if the uploaded file  
actually has content, removing the need for “if file.size \> 0” nonsense  
in your controller.
- Rake tasks to convert from master image directory styles, as well as  
master image formats (jpg =\> png for instance)

And it’s all hosted on “GitHib”:[GitHub - AlexJWayne/fleximage: Rails plugin for uploading images as resources, with support for resizing, text stamping, and other special effects.](http://github.com/Squeegy/fleximage).  
It’s new, it’s awesome, and has extensive documentation in the attached  
Wiki.

Lastly, if you are using _Fleximage_ in an existing production site,  
please add it on the  
“WhoUsesFleximage”:[http://github.com/Squeegy/fleximage/wikis/whousesfleximage](http://github.com/Squeegy/fleximage/wikis/whousesfleximage)  
page. I know you’re out there.

Enjoy, and I would love any feedback anyone has on it!

---

<div class="post-metadata">

**Author:** ![squeegy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Post date:** [April 6, 2008, 8:15am UTC](https://www.ruby-forum.com/t/ann-fleximage-v2/133984/2 "2008-04-06T08:15:45Z")

</div>

Alex W. wrote:

> - No support for DB stored images, sorry…

Just kidding about that part. DB storage works now, with the clause  
that I recommend filesystem storage.

> **[GitHub: Let’s build from here](https://github.com/)**
>
> GitHub is where over 100 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and fea...
