Optimizing Images With PHP

Optimizing images is a big part of website development and optimization. For most webmasters I do not have to go into detail on why you should optimize your images. It was pretty standard, yet it was quite hard to achieve. As far as I know, even casino sites like https://www.daisyslots.com are doing an optimization not just on images but also on videos, which is challenging for developers. For those of you who are not programmers please see information below. For programmers and php program enthusiast I created a tutorial that will help programmers in this process. 


You can copy and paste the code or download it here. optimize images in php Get Code Here

Increase Memory

It may be necessary to increase your memory limit in your php.ini file while performing this process. If you want to view your current memory limit download this file and upload it to your server. PHPINFO This will give you read out information about memory limits. php memory limityou can simply make this file yourself in php and upload it to do the same thing. Here is the code.
<?php phpinfo(); ?>
Here is the php.ini file to download so you can increase your memory size. You want to upload this file to your main directory. php.ini

Examples Before and After

Before Optimize Images in PHP AfterOptimize Images in PHP

Optimize Images For Non Techie People

If you are a non techie person and want to use a plugin for optimizing your images there are a couple. I will include them here.      


Sign Up To Comment