I have an application that allows people to post images on each others profiles with bb code. Problem is, some post very large images, which cover other parts of the site when are viewed.
How can I scale down images, client-side, so they are no bigger than x by y dimensions?
EDIT. These are myspace profile style images.... that people post with [img] tags. They are not uploaded or stored on the site itself.
Scale them down in the server side instead. I guess that you store it there anyhow. Storing it there will reduce the amount of data passed from the server to the clients. If you store the large images, a lot of unnecessary data will be sent to the client in each request which is slower.
If you really want to do it on the client side I guess CSS will resize it for you.
EDIT: Try below, saw it used on another forum, works in IE and should work in most browsers: With css, set the img to have:
width: 590 px;
and the div sorrounding it:
max-width: 590 px;