Jump to content

php thumbnail on upload


Dave516

Recommended Posts

How would I go about taking a small thumbnail of the large picture that im uploading, and save it as another?

 

the php image library (GD) doesnt work because the image is too big (resulting in some kind of overload error), im fairly sure you can change this in php.ini but I dont have access to it.

 

thanks

~Dave

Link to comment
https://forums.phpfreaks.com/topic/119998-php-thumbnail-on-upload/
Share on other sites

I have ran into this before and I simply made it so the images were reduced before upload. I was uploading hi-res images (over 2800px) and the files were > 3MB. Set a limit to the size of image to be uploaded, make the users responsible for it.

 

Maybe not the best solution, but it worked for me.

 

I found this with a quick search.

 

ini_set( 'memory_limit' , 100000000); // set to 100mb

 

ini_restore('memory_limit'); //restore back to default

 

I found this in the following post at another forum.

 

http://forums.devnetwork.net/viewtopic.php?p=240870

I wanted to display a thumbnail (cropped image) and I thought that using php's gd library I could take a thumb nail and save it.. turns out, I didnt have to. I can just do it through css...

 

http://dynamixco.com/mariasphotos/photos/

 

was my project. you can see and click on the photos

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.