PDA

View Full Version : Auto resize of avatar? HOw was this done...


stryka
04-19-2008, 10:53 PM
Imeem has different sizes of their members avatars... when viewing the profile you have the large size and when viewing other areas where they left comments it is smaller... here are the links

http://icons.imeem.com/4Jg5ur7.jpg?w=50

http://icons.imeem.com/4Jg5ur7.jpg

It is pointing to the same JPG??? How do they do that on the fly... what is ?w=50 doing?

ANy ideas... suggestions... i would like to do this somehow...

thanks

MoT3rror
04-19-2008, 11:45 PM
I am just guessing they are using mode rewrite like this.

RewriteEngine On
RewriteRule ^([^/]*).jpg$ /image.php?name=$1
RewriteRule ^([^/]*).jpg?w=([^/]*)$ /image.php?name=$1w=$2


Then the php takes care of the resizing.