Copied to clipboard

Flag this post as spam?

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


  • Robin Hansen 135 posts 368 karma points
    Dec 09, 2010 @ 10:05
    Robin Hansen
    0

    Thumbnail fixed size

    I use the default datatype Upload on a webpage, and it works fine, whitout any problems - however I would like to change the thumbnail size to 150 x 150 no matter what constrains the original image has. I've follwed this thread with no luck - my thumbnail still has the default size.

    Do I need to change the size in the source code or what do I do...?

    By the way I use umbraco ver. 4.5.2

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Dec 09, 2010 @ 10:09
    Matt Brailsford
    0

    Hi Robin,

    The way outlined by Richard in the other thread is the official way to do it. Maybe you can post what issues you are having with this method? Most likley candidate is an incorrect URL, as you'll need to construct this yourself based upon the original filename, and the known file dimensions

    [image]_thumb[specified width].jpg/gif 

    Another option might be to use something like ImageGen http://our.umbraco.org/projects/website-utilities/imagegen to create the thumbnail on the fly, but this is entirley down to your circumstances.

    Let us know what problem you are having, and I'm sure we can help you out.

    Cheers

    Matt

  • Robin Hansen 135 posts 368 karma points
    Dec 09, 2010 @ 10:26
    Robin Hansen
    0

    Hi Matt - tnx for your quick reply... - the issues I'm having by doing it the "official way" is that it quit simple does'nt work - by that I mean no matter what I type in the field the thumbnail keeps it's default size which in most cases is 100x75.

    Here's a quick overview of what I've tried so far:
    150;150
    150;150;
    150
    150;
    150px;150px
    150px;150px;
    150px
    150px;

    Have I misunderstood something...?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Dec 09, 2010 @ 10:39
    Matt Brailsford
    0

    Hi Robin,

    The default thumbnail will always be the max 100 pixels, what adding values to the upload controls prevalue does is to create additional thumbnails. So in your case it should just be the value 150. Umbraco will treat this as a square value, but one thing to be aware of is that it these are Maximum contraints, so unless you have a square image, one side will always be shorter (ie, it creates a thumbnail to fit within a 150x150 box). Try searching your media folder for *_thumb150* to see if it is actually creating them.

    If you need your image exactly 150x150, then I would look to use ImageGen instead.

    Many thanks

    Matt

  • Robin Hansen 135 posts 368 karma points
    Dec 09, 2010 @ 10:47
    Robin Hansen
    0

    You're right - I found a *_thumb150* image in the media folder... - I think I'll take a look at the ImageGen instead...

    tnx a lot... (no sarcasm here) - your help war highly appreciated ;-)

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Dec 09, 2010 @ 10:48
    Matt Brailsford
    0

    No problem.

    Glad I could help.

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft