Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MartinB 411 posts 512 karma points
    Aug 12, 2010 @ 22:59
    MartinB
    0

    Image Cropper - How to use the cropped images?

    Hi there

    I'm trying to grasp how the built in image cropper function works. I've made the datatype and my prefered image size for some news items.

    When i go crop the image and save i can see that i get a picture in the folder that the original image is in, but i can't select it through my media section. Am i missing something here?

    I've seen the youtube video about the plugin (when it was a package), and i can that the author has two properties on his textpage, but are they really needed when i just want to crop images and have them saved somewhere where i can get a hold of them and insert them in my news items?

    Best Regards

  • shkod 10 posts 62 karma points
    Aug 12, 2010 @ 23:14
    shkod
    1

    Hi

    Using Image Cropper Packege from XSLT:

    <xsl:variable name="media" select="Cultiv.MediaCache:GetMedia(./data[@alias='yourPictureProperty'], 0)/data" />

    <xsl:if test="$media">

    <img src="{$media [@alias = 'umbracoFile']}" />

    </xsl:if>

    This XSLT works on Umbraco 4.0.2.1, if you use 4.5 change "Cultiv.MediaCache" to "umbraco.library".

  • Arjan H. 223 posts 460 karma points c-trib
    Aug 12, 2010 @ 23:18
    Arjan H.
    1

    You won't be able to see the cropped version(s) of the image in the media picker. You just have to select the media item and use the following XSLT code the fetch the cropped version of the image (in Umbraco v4.5):

    <img src="{umbraco.library:GetMedia(propertyName,false)//crop [@name = 'cropName']/@url}" alt="" />

    Where propertyName is the alias of the media picker property and cropName is the name of the crop you want to display.

  • shkod 10 posts 62 karma points
    Aug 12, 2010 @ 23:20
    shkod
    1

    Oh, sorry, I made mistake

    You should using <img src="{$media [@alias = 'Crops']//crop [@name = '120px']/@url}" />  instead <img src="{$media [@alias = 'umbracoFile']}" />

  • MartinB 411 posts 512 karma points
    Aug 13, 2010 @ 09:02
    MartinB
    0

    Hmm

    Well then it's not quite what i want. I just want my client to be able to upload an image, crop it, overwrite originally uploaded image and then be able to select it through a media picker.

    Well, of course the above xslt examples will do something like that, but'll always have the orginal image lying around also and taking up space. Espcially if these images gets uploaded directly from the camera it'll be around 3 megs.

    Is there any package that just allows you to crop an image and save it to the media folder so you can grab it by mediapicker?

  • MartinB 411 posts 512 karma points
    Aug 13, 2010 @ 10:00
    MartinB
    0

    I found this free and easy to use software that lets you crop images to any given aspect. It does what i want and i'm sure my client is able to handle it without problems. It even lets you add captions to the crops you make, that you can move around to fit where you want it. From there it's just an easy upload to umbraco!

    Very useful when you have images of set width and height that must not be exceeded, like frontpage headers etc.

    http://www.darkwood.demon.co.uk/PC/crop.htm#latest

  • Arjan H. 223 posts 460 karma points c-trib
    Aug 13, 2010 @ 10:08
    Arjan H.
    0

    If you want your client to crop/resize images before they upload the image to Umbraco, you could also suggest some free online crop/resizing tools:

    http://www.webresizer.com/resizer/
    http://www.picresize.com/

    Although dealing with larger source files it might be easier to use a desktop app.

  • MartinB 411 posts 512 karma points
    Aug 13, 2010 @ 11:53
    MartinB
    0

    Hi Arjan

    My client is the only one doing the updates, so the desktop app will be a nice starter, but of course it would be awesome if he could do something online, when he's not at his work station :-)

    Many thanks for the additional links!

     

  • Matti 15 posts 35 karma points
    Sep 29, 2010 @ 14:00
    Matti
    0

    MartinB: I've had the same problem - I'd like the crop function to be an integrated part of the TinyMCE dialog so my clients could upload, crop/resize images without entering the media section.

    That being said, uploading 3-5MB images just to crop them to a few hundred kBs seems like a waste of time and bandwidth :)

    What i usually recommend is MIR used in conjunction with Desktop Media Uploader - take a look for yourself and see if it fits your bill..

    MIR: http://www.multipleimageresizer.net/

    DMU: http://our.umbraco.org/projects/website-utilities/desktop-media-uploader

     

     

Please Sign in or register to post replies

Write your reply to:

Draft