PDA

View Full Version : Re-sizing avatars


amagab
10-07-2008, 10:58 PM
I have up until now allowed for avatars to be 80x80. However, with a change in the style I now have changed the allowed size to 50x50. For obvious reasons the already uploaded avatars still stay 80x80.

Does anyone know of a way or of a program that can resize a folder of avatars. I was thinking of downloading the avatar folder, resize and then upload again. Does anyone know of a program that can batch that process?

Thanks!

nerofix
10-08-2008, 12:32 AM
I have up until now allowed for avatars to be 80x80. However, with a change in the style I now have changed the allowed size to 50x50. For obvious reasons the already uploaded avatars still stay 80x80.


The avatar size if very often defined in templates.

Where they appears still in 80x80 on your site?


search in all templates for

[avheight] and replace the entire $variable with height="50" ....
[avwidth] and replace the entire $variable with width="50"

C2Systems
10-08-2008, 02:18 AM
on the subject of avatars ... I know if you click on it that takes you to that users profile .. is there a way to have a full sized version of the avatar associated instead? I was just thinking of an older forum I was on that you could *right click* "view image" and see the full scale image that the user uploaded

Lynne
10-08-2008, 02:38 AM
The size of the avatar on the members.php page is defined at the top of includes/class_core.php
define('FIXED_SIZE_AVATAR_WIDTH', 60);
define('FIXED_SIZE_AVATAR_HEIGHT', 80);

You can probably either change that or modify the template to make it a link to the full-sized version.

amagab
10-08-2008, 02:55 AM
I was probably not clear in my first post. I only want to resize avatars in the post view.

Lynne
10-08-2008, 03:05 AM
Sorry, I was responding to the post above mine.

I know photoshop can easily resize all those avatars if you have photoshop. However, I don't know that you can simply replace the images that way on the server and have them work. You could just either ask all your users to reupload an avatar that complies with the new size limit, or try to modify display size as nerofix suggested.

amagab
10-08-2008, 03:16 AM
Sorry, I was responding to the post above mine.

I know photoshop can easily resize all those avatars if you have photoshop. However, I don't know that you can simply replace the images that way on the server and have them work..

Now if that works I will do that. Does Photoshop do batch processing of an entire folder? I guess the other question if the current avatars will be replaced when I overwrite them with smaller avatars?

Lynne
10-08-2008, 03:22 AM
I don't know that photoshop does it by default, but I wrote something to do batch resizing for a folder a while ago for some banners we had on the site. It may be a built in function now, I don't know. You basically just record what you do and then do that to the whole folder. If your batch process is made to save the file with the same name, then there is no reason you can't just upload them to overwrite the existing ones.

I would NOT do this on a live site. I would practice it on a text site. Also, when testing, make sure you clear your browser cache or you may *think* all is OK when it actually isn't.

amagab
10-08-2008, 03:55 AM
Thanks, I think I'll try to resize a couple of them first before batching. Guess I start with my own. :-)

TerryMason
12-03-2008, 06:57 PM
Horrible website, but great, simple batch image resizer:

http://www.xat.com/io/

I also use this program all the time to turn 3 mb files into nice websafe 90kb ones.

christian8a
12-03-2008, 07:38 PM
The size of the avatar on the members.php page is defined at the top of includes/class_core.php
define('FIXED_SIZE_AVATAR_WIDTH', 60);
define('FIXED_SIZE_AVATAR_HEIGHT', 80);

You can probably either change that or modify the template to make it a link to the full-sized version.

Nice to know this.. and where should the resize quality could be? I know is set to 75% and I would like to increase it

Lynne
12-03-2008, 07:47 PM
Doing a search of "75" in the forums folders shows me several options, but I'm guessing it's in function set_convert_options in the class_image.php file. (There are other functions which it could be, just do a search for "75" in that file.)

christian8a
12-03-2008, 08:11 PM
Doing a search of "75" in the forums folders shows me several options, but I'm guessing it's in function set_convert_options in the class_image.php file. (There are other functions which it could be, just do a search for "75" in that file.)

thank you :up:
well there are alot of other options but I changed all of the 75 to 100 to try and now the avatars on the friends mini looks great! I think itll be ok to leave the other functions to 100 right? my server is a vps for now but is a new site, not many members

murdoc
03-25-2009, 12:04 PM
hey guys, on my forums people host there avatars at sites like imageshack and photobucket, i just would like to know is there a way to limit avatars on the forums to ONLY be 50 X 50

because we have random size avatars now which is taking allot of space

could anyone help me ?

Seven Skins
03-25-2009, 12:36 PM
<a href="http://www.irfanview.com/" target="_blank">http://www.irfanview.com/</a> << freeware does the batch processing.

Step you should take:
Change usergorups permissions so they can not upload lagee then 50x50 avatars
Download all avatar form the server.
Resize them using irfanview.
Make sure file names dont get changed.
Upload all avatars to server.

PS. I havent tried it ... so use above info your own risk

murdoc
03-25-2009, 12:47 PM
so there is no option that you can enable, that wont allow avatars that has a width greater then 50 X 50 ?

Seven Skins
03-25-2009, 01:17 PM
For posts (postbit) you can edit "$post[avwidth] $post[avheight] to width="50" height="50" But it will only change the size of avatar in posts.

murdoc
03-25-2009, 01:37 PM
thanks dude :P

Lynne
03-25-2009, 01:52 PM
You can set the size for the allowed avatars in the Usergroup Manager for each usergroup.

Seven Skins
03-25-2009, 02:15 PM
If big avatars has already been uploaded they don't get resized by editing usergroup manager.

.

murdoc
03-25-2009, 02:32 PM
ah ok cause that is currently the problem that im sitting with

so i would need to re size all the avatars :/ am i correct in saying that ?