1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Getting thumbnails for User Profile widget?

Getting thumbnails for User Profile widget?

3 posts, 0 answered
  1. Ryan
    Ryan avatar
    57 posts
    Registered:
    07 May 2013
    12 Mar 2014
    Link to this post

    Users are able to upload any size image they want, which is fine, but it's showing the same full-size image on the widget. See attachment. 

     The template is using this control to grab the image: <sf:ImageField ID="predefinedImageField" runat="server" SizeInPx="100" DataFieldType="Telerik.Sitefinity.Model.ContentLinks.ContentLink" WrapperTag="li" DisplayMode="Write" ShowDeleteImageButton="false" DefaultSrc="~/SFRes/images/Telerik.Sitefinity.Resources/Images.DefaultPhoto.png" DataFieldName="Avatar" UploadMode="InputField" CssClass="sfprofileField sfprofileAvatar" />

    How can I get it to render the thumbnail instead? I've already written a helper that would get this for me, but there has to be a more logical way to do this. Thanks.

     

  2. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    17 Mar 2014
    Link to this post
    Hello Ryan,

    We do not have any functionality that allows that. The profile widget crops the selected widget and sets it to a predefined dimension based on the widget template. If you wish to alter its dimensions you can always override its sfPreviewImgFrame class.

    Regards,
    Ivan D. Dimitrov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Ryan
    Ryan avatar
    57 posts
    Registered:
    07 May 2013
    17 Mar 2014 in reply to Ivan D. Dimitrov
    Link to this post

    *Sigh*

     So even though the intent of this profile widget is to display an avatar, the developers of Sitefinity never bothered to think that a 4000px wide photo probably shouldn't be used as a avatar after 6 major iterations? Christ. Don't worry. Yet another custom hack accomplished what should be common-sense (i.e., out of the box) functionality. I wrote an extension to get the URL of the thumbnail (.tmb) file. 

     Sorry to vent but, c'mon. Not blaming you personally, of course. 

     BTW, your fix merely changes the dimensions on the client. A 4000px, 10+MB image could still be downloaded, but resized in the browser. Obviously on mobile, this is a terrible experience. 

3 posts, 0 answered