Image thumbnails?
Perhaps I've completely missed it but I can't see anything covering thumbnails anywhere in the docs.
Do you plan to have a thumbnail filter?
Cheers,
Galen
Log in to Harmony
Perhaps I've completely missed it but I can't see anything covering thumbnails anywhere in the docs.
Do you plan to have a thumbnail filter?
Cheers,
Galen
2 Posted by John Nunemaker on 26 Jan, 2010 12:46 PM
Right now it makes a thumb for each asset but the size is not
changeable. Eventually we would like to allow specifying versions.
3 Posted by Galen King on 27 Jan, 2010 09:12 PM
FYI, we developed a liquid filter for Mephisto that works like this:
{{ imageobject | thumbnail: 500 }}would create an image 500px wide{{ imageobject | thumbnail: 'medium', '>500x500' }}would create an image that fits within a 500 x 500px square IF the original's greater than 500px. The 2nd parameter is basically the RMagick parameter string.We used RMagick because it was part of attachment_fu (I think). Would have preferred something like Paperclip.
The biggest drawback of our thumbnailing system is that it doesn't allow for "zoomcrop" whereby, you specify, say, 500px wide x 200px high, it will crop the image to fit these proportions. That, from my experience, is crucial to being able to create beautiful layouts that a client can add to easily with no fuss and no hassle.
Where do you guys stand on this?
Cheers,
Galen
4 Posted by John Nunemaker on 27 Jan, 2010 09:28 PM
That is an interesting idea but I don't want to have imagemagick getting
involved when we are rendering the front side stuff. That would really
hinder performance. More likely, we would allow you to set styles in the
admin for assets and file upload field types that would do the same thing.
Then in the view you would do something like paperclip:
{{ item.pic.thumb_url }}
Or something like that. Make sense? We definitely want to do something like
this, but it is towards the bottom of the queue right now.
5 Posted by Galen King on 27 Jan, 2010 09:31 PM
Sorry, our thumbnailing is done (I think) when the page is saved. The thumbnails are then stored (cached). They are not generated on-the-fly.
Having said all that, our system had major limitations from the user’s perspective in that all thumbnailing was done in the templates. If a user placed an image in the content, we couldn’t do any thumbnailing at all and that’s a bit of a pain.
I look forward to seeing what you come up with.