Resize image in PHP

You need to use either PHP’s ImageMagick or GD functions to work with images. With GD, for example, it’s as simple as… And you could call this function, like so… From personal experience, GD’s image resampling does dramatically reduce file size too, especially when resampling raw digital camera images.