Seems to be that thumbnails generation and rendering of images (ie
uploaded images get applied with watermarks) happen dynamically (ie.
the watermarked thumbnails are generated when a request is made).
Sorry, looked at the source code for Resize and it seems to be the
case.
Can anyone confirm that this is the case?
Has anyone used FlexImage in their production environment and can
comment if dynamically generating images would take up the server’s
available resources (ie. memory footprint)?
Has anyone got another plugin to recommend that would satisfy the
following criteria?
can resize thumbnails to different sizes (ie, small, medium,
large)?
can apply watermarks to uploaded images?
images can be stored in either database or file system ( allows
future expansion or swap from one storage method to another)
Seems to be that thumbnails generation and rendering of images (ie
uploaded images get applied with watermarks) happen dynamically (ie.
the watermarked thumbnails are generated when a request is made).
Sorry, looked at the source code for Resize and it seems to be the
case.
Can anyone confirm that this is the case?
This is true. But you can cache the result to disk using Rails
caches_page… Long ago I had this in one of my controllers:
# there was a thumb one too, but have removed it to save room.
end
If you go to the url below the thumbnails are generated (and cached)
using the above code and if you click on the image you’ll see the
larger version with watermark.
Has anyone used FlexImage in their production environment and can
comment if dynamically generating images would take up the server’s
available resources (ie. memory footprint)?
They will take up RAM when being generated. If you cache them they
will take up disk space, but after that are like any other image.
Has anyone got another plugin to recommend that would satisfy the
following criteria?
can resize thumbnails to different sizes (ie, small, medium,
large)?
can apply watermarks to uploaded images?
images can be stored in either database or file system ( allows
future expansion or swap from one storage method to another)
paperclip can do this I think. I know it can resize and if you google
I’m sure someone has instructions on how to set it up to watermark the
images (it uses ImageMagick underneath which can watermark so should
be doable). Images can be stored in the filesystem or on S3. Not
sure about in a database (just never paid attention to that part).
guys, I am using paperclip and have been prettyhappy with it.
One thing though is that if I were to specify my image dimensions for
landscape images (ie. 600x400, 800x600, 1024x768 and so forth),
uploading pictures which are portrait (ie. 400x600, 600x800, 768x1024
and so forth) would cause cropping and streching (undesired).
When using ImageMagicK with perl (via PerlMagick), I used to detect if
width>height, then it is a landscape and I will resize by means of
width x height. Otherwise, being portrait, I would resize by means of
height x weight.
I might have a closer look at this tonight but any ideas of how to
overcome this problem in Rails?
thanks
gordon
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.