php simple image resize after upload

28,070

Solution 1

I use this easy 1 function that does it all

check it out :

http://www.nimrodstech.com/php-image-resize/

https://github.com/Nimrod007/PHP_image_resize

Solution 2

I have used PHPThumb for a few of my projects and found it easy to work with and has a small resource footprint. You can read the docs for more info, but is pretty easy:

$thumb = PhpThumbFactory::create('/path/to/source/image.png');

$thumb->resize(100, 100);

$thumb->save('/path/where/you/want/resized/image.png');
Share:
28,070
Mankind1023
Author by

Mankind1023

Updated on February 17, 2020

Comments

  • Mankind1023
    Mankind1023 about 4 years

    I looked around for a while and found some very confusing and complicated stuff that I couldn't get to work.

    I'm using chronoforms with joomla to make a form with an upload file script, and it uploads the image to the server with no problems, so far so good.

    I need to take the uploaded image and resize it, better yet, is there a way to resize the image before uploading it to the server?

    Thanks.