Copied to clipboard

Flag this post as spam?

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


  • Meni 271 posts 507 karma points
    Apr 25, 2013 @ 01:37
    Meni
    0

    How to create Thumbnail in Umbraco using WebImage? (with Razor)

    I try to create 2-3 Thumbnails for each photo I upload with the Mediapicker.

    It's mean - every photo that upload should have 140x100 version and 350 x 200 version.

    I don't want to use the ImageGen so I found this article about the WebImage helper - with this code:

    http://www.asp.net/web-pages/tutorials/files,-images,-and-media/9-working-with-images

    But it's not work (Just created new Razor Script - not work .. ) - how do I do it?

     

    Thanks.

  • Rich Green 2246 posts 4008 karma points
    Apr 25, 2013 @ 08:20
    Rich Green
    0

    Hey Meni,

    You can get thumbnails created automatically everytime you upload an image using Umbraco, watch one of Doug Robar's "Did you Know" videos.

    Rich

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 25, 2013 @ 08:35
    Dennis Aaen
    1

    Hi Mini,

    I just found the video where Doug Robar's explains about the Thumbnail in Umbraco. But he shows how to print it in XSLT.

    http://stream.umbraco.org/video/2198461/did-you-know (see from 26:20 min to 27:20).

    /Dennis

  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    Apr 25, 2013 @ 09:23
    Dave Woestenborghs
    2

    You can set this on the upload datatype.

    Go to the developer section, then go to datatypes and choose the upload datatype. There you can set the thumbnail sizes to be generated seperated with a semicolon e.g. 100;200;300

    This will generate filenames  like this :  image.jpg, image_thumb.jpg, image_thumb_100.jpg,image_thumb_200.jpg,...

    Dave

  • Meni 271 posts 507 karma points
    Apr 25, 2013 @ 21:39
    Meni
    0

    Hi, Thanks for the answers. Right now I'm using the Media picker to handle the pictures - should I use instead the upload datatype? Why though in all the examples I founded online they use the Media picker? Is it possible to do it also with the media picker?

  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    Apr 26, 2013 @ 08:10
    Dave Woestenborghs
    0

    Hi Meni,

    The media picker uses the upload type internally to create new items. So it will also create all the thumbnails.

     

    Dave

  • Meni 271 posts 507 karma points
    Apr 26, 2013 @ 11:34
    Meni
    0

    Hi Dave, Thanks.

    I looked into the Media picker under the developers section (Data types) and there is nothing about Thumbnail sizes under the settings (like with the "upload"). The only settings are: Show preview and Show advanced dialog - how do I access the thumbnails which the media picker generate as well as how do I modify them to my needs? (I need 140px width / 225px widh and 350px width)

     

    Thanks 

  • Rich Green 2246 posts 4008 karma points
    Apr 26, 2013 @ 12:11
    Rich Green
    1

    Hey Meni,

    Have to ask, why don't you want to use ImageGen? It's free and you could have this functionality in 5 mins.

    Rich

  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    Apr 26, 2013 @ 12:26
    Dave Woestenborghs
    0

    Hi Meni,

    You will need to set the sizes on the Upload datatype. The mediapicker datatype will use these.

    Dave

Please Sign in or register to post replies

Write your reply to:

Draft