Skip to content

Instantly share code, notes, and snippets.

@sakirsensoy
sakirsensoy / image-resizer-and-optimizer.md
Last active November 21, 2024 01:15
Wordpress Image Resizer / Optimizer

Wordpress Image Resizer / Optimizer

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.

Installation

@sakirsensoy
sakirsensoy / example.com
Last active August 29, 2015 14:05
Laravel 4 Nginx Configuration
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 / {
@sakirsensoy
sakirsensoy / imageToolExam.php
Last active December 29, 2015 13:19
imageTool'un kullanım örnekleri
<?php
use PosGen\ImageTool\ImageTool;
//örnek thumbnail oluşturma
$imageThumbs = ImageTool::open("a.jpg")
->thumbnail([
'width' => 50,
'height' => 50,