Jump to content

image resize on the client machine


beermaker74

Recommended Posts

It's possible with HTML. Just force a size in the img tag. Instant image resize.

EDIT: Re-read your question. Even if there was a way with Javascript, it probably wouldn't look very good, and it would be a large amount of code.

With PHP you can take the temp file that was uploaded, AFTER it's on the server, and resize it. But there's no way with PHP to make modifictions to a file PHP hasn't seen yet.
if I had a real popular site, wouldnt that really eat into my bandwith. It would be nice to have an app that can resize a folder on the clients machine then upload. I have seen some ajax stuff that kind of does that. If it wont affect bandwith much then I guess I will go with the php method.
thanks
[quote author=beermaker74 link=topic=124354.msg515067#msg515067 date=1169944138]
if I had a real popular site, wouldnt that really eat into my bandwith.
[/quote]
It will add to it, but not as much as people viewing the images.

Set this in your upload form:
<input type="hidden" name ="MAX_FILE_SIZE" value="2000000">

If your site bandwidth limit can't take 2mb file uploads, then you probably shouldn't be doing user images.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.