Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

How can I set a profile image to always show a certain height and width, no matter?

AFNAFN New
edited March 2012 in Vanilla 2.0 - 2.8

How can I set a profile image to always show a certain height and width, no matter what the size of the image is, even if the image is very small or way too large?

Answers

  • Options
    422422 Developer MVP

    Width and height simple as

    There was an error rendering this rich post.

  • Options
    422422 Developer MVP

    or in real terms

    .Photo {
    max-height:100px;
    max-width:100px;
    }
    .Photo img {
    min-height:100px;
    min-height:100px;
    }
    

    Should Work

    There was an error rendering this rich post.

  • Options

    A while back I changed the height and width, so the image that is being uploaded will not be resized (see this thread http://vanillaforums.org/discussion/17504) which I don’t want to change this that file, however what I want to change or accomplish is that when a user or someone else visits http://URL.tld/profile/Admin, the profile’s image will stay 100 X 100 even if someone uploads an image 1000 X 2000 or in this case if the image is 60 X 60 it will always show in the profile’s page as 100 X 100.

  • Options
    422422 Developer MVP
    edited March 2012

    Not the best way of doing things, you should still scale. Plus i would seriously adapt different upload validation for image sizes

    There was an error rendering this rich post.

Sign In or Register to comment.