Getting thumbnails for User Profile widget?
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.
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.
Ivan D. Dimitrov
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.