public ActionResult Photo(int id, int w, int h, string config)
        {
            string photoUrl = string.Empty;

            try
            {
                using (Agility_UGC_API_WCFClient client = UGCAPIUtil.GetAPIClient("http://ugc.agilitycms.com/agility-ugc-api-wcf.svc", TimeSpan.FromSeconds(10)))
                {
                    DataServiceAuthorization dsa = UGCAPIUtil.GetDataServiceAuthorization(-1);
                    Record userProfile           = client.GetRecord(dsa, id, FileStorage.EdgeURL);

                    if (userProfile != null)
                    {
                        if (!string.IsNullOrEmpty(userProfile.GetValue("AgilityCommentsPhoto") as string))
                        {
                            //if photo found, use this
                            photoUrl = userProfile.GetValue("AgilityCommentsPhoto") as string;

                            photoUrl = CommentsUtils.GetTranscodedUrl(photoUrl, w, h);

                            return(Redirect(photoUrl));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Agility.Web.Tracing.WebTrace.WriteException(ex, string.Format("Error getting profile image for {0},", id));
            }

            //no profile found or no photo found
            var configReferenceName = config;

            var configRepo = new AgilityContentRepository <AgilityContentItem>(configReferenceName);

            if (configRepo != null)
            {
                var defaultImage = configRepo.Item("").GetAttachment("DefaultAvatar");
                if (defaultImage != null)
                {
                    return(Redirect(CommentsUtils.GetTranscodedUrl(defaultImage.URL, w, h)));
                }
            }
            return(new EmptyResult());
        }