With wordpress there are a lot of plugins for optimizing previously uploaded images. Interestingly, almost all plugins direct you to use their own APIs for this task and charge high fees for this simple task. Whereas on our own server we can do it very simply. The image optimization function below will probably do the trick. I would base it on the ubuntu operating system, but you can easily find related packages for other operating systems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name example.com; | |
root /home/vagrant/Code/example.com/public; | |
index index.html index.htm index.php; | |
charset utf-8; | |
location / { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PosGen\ImageTool\ImageTool; | |
//örnek thumbnail oluşturma | |
$imageThumbs = ImageTool::open("a.jpg") | |
->thumbnail([ | |
'width' => 50, | |
'height' => 50, |