Gavatar - Multiple Sizes
I'm wondering why the UserPhotoDefaultUrl
function does not allow multiple sizes of the thumbnail size that it uses. I am aware that it uses Garden.Thumbnail.Width
to set the width, but what if I want to use the picture in two different scenarios which require two different sizes? For example, I want to use the gravatar image in the profile page which requires a width of 160px versus just the regular 50px thumbnail for discussions.
This is my current hack:$DefaultWidth = C('Garden.Thumbnail.Width',50); SaveToConfig('Garden.Thumbnail.Width',250); echo UserPhoto($Builder, array('LinkClass' => 'ProfileMainImage', 'ImageClass' => 'ProfileMainImage')); SaveToConfig('Garden.Thumbnail.Width',$DefaultWidth);
I would like to see this changed in the next release if possible.
Answers
But you could control this with .css by appending the body id from profile to your profile image class. Couldnt you?
There was an error rendering this rich post.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I could, but I would be stretching the orginal image to fit whatever resolution is specified in CSS.
The same with @peregrine.....I need to specify the source image as larger. Anything else will just stretch it to fit the resolution. I am going to stick my workaround for right now.
Similar to youtube thumbs, do gravatars come in varying resolutions?
There was an error rendering this rich post.
yes they do...the size of the image is put into part of the URL
Couldnt you do a preg replace.
There was an error rendering this rich post.