Using CropUp and DAMP in Umbraco
DAMP offers some great improvements for dealing with Media in Umbraco:
The way CropUp does cropping is just magic (obviously, because Niels Kühnel is involved it's really a lot of math - but it's magic math, nonetheless :-)
You set a gravity point and CropUp just makes sure that that point is prominently included in the crops it delivers.
Any media item can be cropped on the fly (like with ImageGen) - you don't have to specifically create a cropping property if you're just using the default crops CropUp delivers.
CropUp comes with XSLT extensions that makes it a breeze to pull the desired crops from the media.
When you need to add or change existing crops you just do it. It doesn't affect your existing crops - if you ever used the standard Image Cropper on a real project, you know how huge this is!
A Textpage in Umbraco has a pageImage
property that points to a Media item.
On the page's own URL that image is a big wide banner, but if the page is featured on the front page of the site, we want to show a square thumbnail (with a link to the page of course).
In CropUp we set up banner and thumb crops - because we are pedantic about images, we know we may want to tweak a crop or two down the line, so we also create a cropping
property on the media item as well - it's very simple as CropUp only needs to know the propertyalias of the uploaded file (which is almost always umbracoFile
anyway).
NOTE: CropUp aliases must be all lowercase and can not contain spaces, dashes etc. (which actually makes great sense, since they end up as part of the URL). The Name you assign can be anything, though.
On the front page we have a Multi-Node Tree Picker (or that fancy new Widget Grid hotness!) to enable selecting pages for featuring.
Hmm... that's it, actually :-)
For the editors it's dead simple - they just choose a great photo/image when creating a page. If they need to, they can adjust the "gravitation" point, or maybe zoom a little into a crop, if necessary.
For the developers it's equally great because it's very easy to work with this combo (I use XSLT - wouldn't know about the Razor side, though I imagine it's equally good).
There are a couple of things you currently can't do when using CropUp (instead of the standard Image Cropper) with DAMP:
Both are minor issues to our workflow but your mileage may of course vary.
UPDATE: These should be non-issues when DAMP v2.6 is out! Check the source repo if you need it now.
Feel free to bug me about any specifics to this! I'm greystate on twitter too :-)
/Chriztian Steinmeier