Plugins - attachment_fu_app_engine

StarAdd to favorites

Extension for AttachmentFu (http://github.com/technoweenie/attachment_fu) which uses the Google App Engine for storage and image resizing. Allows you to add or change thumbnail sizes without migrating previous data and removes the need to install ImageMagick.

The Google App Engine backend code is included so you can run it in your own App Engine instance.

Example

=

class Photo < ActiveRecord::Base

  has_attachment :storage => :app_engine, :thumbnails => {:small_square => "45x45!"}

end

AttachmentFuAppEngine attempts to reproduce the resize format from ImageMagick.

  • "100x100" - scale the image to fit within a 100x100 box (the larger dimension will be 100, such as 100x75), preserving the aspect ratio. Will scale up small images.
  • "100x100!" - scale the image to be exactly 100x100 by scaling proportionately and cropping off the edges. Will not distort the image but may hide part of it.
  • "100x100>" - scale the image to be at most 100x100 - smaller images will not be enlarged.

In addition to the standard thumbnail specification: Image.find(1).public_filename(:small_square)

you can also use: Image.find(1).public_filename(‘40x40!’)

Lars Klevan

http://github.com/larsklevan/attachment_fu_app_engine

git://github.com/larsklevan/attachment_fu_app_engine.git

Rails' (MIT)

  • Currently 0.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Assets

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?