Best way to optimize all my picture trên site PHP

Hello everyone

I want to create a blog for myself and the optimized image. I use code in PHP but I don’t know how to optimize all of my photos are uploaded and deleted all the images optimized.
What should I do?
Thanks
Here is my site: http://www.xedulichminhduc.com.vn
(as you know, I need the best quality picture but the minimun size). I want to be able to run fast

Thanks for all your help, hope to get some help soon

https://imagify.io has the best image compression vs image quality ratio that I’ve found.

It is easiest to use in Wordpress (they provide a plugin) and there is API access for custom development environments.

Both Free and (very low cost) Premium plans are available.

Best of luck!

While not a free service, I would consider ImageEngine http://imgeng.in which seems to offer everything that you are looking for.

Not only does ImageEngine resize pictures automatically, but it also comes with Device Detection (i.e. actual image size is tailored to the capabilities of the device that requests the image) and with CDN functionality (i.e. once resized the first time, pictures are served off one of many Edge Servers, more precisely the one that is closest to each user!).

Finally, a WordPress plugin for ImageEngine also exists: WP ImageEngine Responsive Image Resizer – WordPress plugin | WordPress.org

Disclaimer: I work for the company that delivers ImageEngine

Thanks to everyone, I have started to conduct image optimization. Page speed begins to improve. great