Improves your

Page load speed & SEO

MegaOptim is powerful cloud image compression service and WordPress plguin carefully engineered that combines several advanced compression techniques to achieve state of the art cloud image compression for your images.

Optimize your images and reduce load times, disk space usage and bandwith usage while also boosting your SEO scores.

Original Image Original
Optimized Image Optimized

Before: 306.79KB

After: 85.29KB

Saved: 72.2%

MegaOptim improves website load speed by optimizing your images without noticeable quality loss. The resulting images are optimized for web and between 50% to 92% smaller than the original which instantly improves your website load speed.

Lossy and Lossless compression

Up to 92% compression rate

WordPress plugin for automatic compression

Subaccounts Manager
Easily manage your clients

JPG, PNG, GIF, WebP support

PHP, Python, Node.js libraries for your projects

CLI Tool for automatic compression

Windows, Linux, OSX Support

Detailed Statistics

Single key multiple sites

GDPR Friendly

24/7 Support

WordPress Plugin

With the WordPress plugin you can optimize your media library, retina images, nextgen galleries, the theme folder and even custom folders that contain images by your choice.

The plugin supports all common image formats such as JPEG, PNG, GIF (animated or non-animated) and also provides WebP support if enabled from the Settings.

Download Read more

Three different compression levels

Supports the three different compression levels: ultra, intelligent and lossless.

Backup & Restore options

Options to automatically backup image, restore if backup available or delete specific backups

Thumbnail optimization support

WordPress creates thumbnails for each full size image. You can now choose which thumbnail versions to be optimized!

WebP support

WebP is newer image encoding format that reduces the image size up to 20% and is recommended to use nowadays. It can be enabled from the settings.

Retina support

Seamlessly integrates with WP Retina 2x and auto optimizes your retina images and thumbnails.

Supports many other plugins

Integrates with different gallery plugins(NextGen, MediaPress, Envira, Foo Gallery, Robo Gallery), CloudFlare, WP Offload S3, WP Stateless, etc.

Built with love for developers

Our main goal is to make MegaOptim available to developers as much as possible. We developed few tools so far to integrate with some popular languages/frameworks.

Make sure you install you have installed MegaOptim PHP library via composer.

use MegaOptim\Optimizer;

$megaoptim = new Optimizer('your-api-key');

$images = [ '/path/to/file1.jpg', '/path/to/file2.jpg' ];

$response = $megaoptim->run( $images, ['compression' => Optimizer::INTELLIGENT ] );

if( $response->isSuccessful() ) {
    foreach($response->getOptimizedFiles() as $file) {
        $file->saveAsFile('path/to/optimized-file.jpg');
    }
} else {
    foreach($response->getErrors() as $error) {
        echo $error;
    }
}
                            

First make sure you install you have installed python and pip and then run pip install megaoptim to install

import json
import os

from megaoptim import Client

# Init MegaOptim API client
api = Client("_YOUR_API_KEY_")
try:
# Pick up local path of the file
files = (
        '/path/to/image1.jpg',
        '/path/to/image2.jpg',
)
# Init empty params, will default to keep_exif=1, cmyktorgb=1, compression=lossy, max_height=0, max_width=0
params = dict()
# Optimize the file
r = api.optimize(files, params, 300)
if r.get('status') == 'ok' and r.get('code') == 200:
    for item in r.get('result'):
        print('Success: ' + str(item['success']))
        print('Original Size: ' + str(item['original_size']))
        print('Saved Percent: ' + str(item['saved_percent']))
        print('Saved Bytes: ' + str(item['saved_bytes']))
        print('Optimized Size: ' + str(item['optimized_size']))
        print('Download Url: ' + str(item['url']))
else:
    errors = r.get('errors')
    for error in errors:
        print(error)
except Exception as e:
template = "An exception of type {0} occurred. Arguments:\n{1!r}"
message = template.format(type(e).__name__, e.args)
print (message)
        
var MegaOptim = require('megaoptim');

var client = new MegaOptim({
api_key: '_YOUR_API_KEY_'
});

// Up to 5
var source = ['/path/to/file1.jpg', '/path/to/file2.jpg', '/path/to/file3.jpg'];

client.optimize(source, {}, 300, function (response) {
if (response.status === 'processing') {
    // Still processing.
    // If callback_url has been passed the status will be processing
    // So you should handle the processing in your callback url.
} else if (response.status === 'ok') {
    // Processing finished!
    // Results are there
    for (var i in response.result) {
        if (response.result.hasOwnProperty(i)) {
            console.log('Total saved: ' + response.result[i].saved_percent + '%');
            console.log('Download url: ' + response.result[i].url)
        }
    }
} else if (response.status === 'error') {
    // If error happened you have an errors array with all the errors.
    for (var i in response.errors) {
        if (response.errors.hasOwnProperty(i)) {
            // Print errors or do something!
            console.log(response.errors[i])
        }
    }
} else {
    // Unexpected error
}
});

                        

Make sure you install you have installed python and pip and then run pip install megaoptim to install.

cd directory
megaoptim --api-key YOUR-API-KEY --dir . --compression intelligent