Jump to content

Display images correctly


echofool
 Share

Recommended Posts

HeyHow do sites keep image ratios correct for user galleries when showing a tab of the image.For example on facebook regardless of image size it tends to keep its ratio of width and height but scaled down. Yet on mine when some one uploads a image and i display a tile which is obviously smaller with a set width/height the ratio is wrong making people look either too fat/short :)How does facebook do it ?

Link to comment
Share on other sites

You can use a server-side language to generate thumbnails of the correct size and aspect ratio. If you set only the width xor the height, then the aspect ratio will be preserved as well.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...