HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[HOW TO] Change Thumbnail Size

revaxartsrevaxarts New
edited July 2011 in Feedback
I needed a bigger thumbnail for my theme but I always got the 50px width.

I did the following modifications on the application/dashboard/views/profile/thumbnail.php (I actually copied that file in my theme folder)

add this at the top of the file
<?php if (!defined('APPLICATION')) exit();

$this->ThumbSize = C('Garden.Thumbnail.Width');
$this->Form->AddHidden('w', $this->ThumbSize);
$this->Form->AddHidden('h', $this->ThumbSize);
$this->Form->AddHidden('ThumbSize', $this->ThumbSize);
and add this line in your config.php file
$Configuration['Garden']['Thumbnail']['Width'] = 90;
Any suggestions?


  • lucluc ✭✭
    edited July 2011
    If you already uploaded your thumbnails, they are certainly already resized, re-up.

    And you've just change the view.
    I don't know if need to change something else than your config to get the correct thumbnail size.

  • revaxartsrevaxarts New
    edited July 2011
    The forum is fresh, no user, no thumbs :)

    Only change the config doesn't work for me (v 2.0.18b2)
  • lucluc ✭✭
    Config param seems to be used only for gravatar:
    plugins/Gravatar/default.php: .'&size='.Gdn::Config('Garden.Thumbnail.Width', 40);
  • lucluc ✭✭
    Looks like it's using Garden.Thumbnail.Size when uploading.
  • lucluc ✭✭
    public function Picture($UserReference = '', $Username = '') in applications/dashboard/controllers/class.profilecontroller.php
  • Thanks @luc, works perfect!
  • Hi, @revaxarts please tell us what exactly did you change from the above. I lost :)

  • OK, now solved! Thanks @revaxarts for the solution.

  • edited February 2013

    So what did you guys exactly did?????

    I change
    .'&size='.C('Garden.Thumbnail.Width', 250); to 250 pixel in plugins/Gravatar/default.php
    $Configuration['Garden']['Thumbnail']['Size'] = 250; to 250 pixel in conf/Config.php

    Also uploaded a new resized (250 x 250) usericon.gif to the application/dashboard/design/images/usericon.gif
    and uplaoded a new resized (250 x 250) default.gif to plugins/Gravatar/default.gif

    Tried creating a new user but I'm still getting the same old 48 x 48 (default) avatar instead of my new file which is pixelating under my 80 x 80 css style.
    What did you guys do?????

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    The defaultuser.gif is being called from /applications/dashboard/design/images/usericon.gif

    just change it there too

  • @vrijvlinder said:
    The defaultuser.gif is being called from /applications/dashboard/design/images/usericon.gif

    just change it there too

    Ok for some reason there were a hidden cache file which updates itself. I did everything right but it seemed the original profile picture was cached somewhere (definitely not my browser's cache). Now it's okay, its using the new one now after sometime.

Sign In or Register to comment.