PHPackages                             tinify/magento2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. tinify/magento2

ActiveMagento2-module[API Development](/categories/api)

tinify/magento2
===============

Make your web shop faster by compressing your JPEG and PNG images. This plugin automatically optimizes your images by integrating with the popular image compression services TinyJPG and TinyPNG.

1.1.2(7y ago)4345.8k↓50%9[3 issues](https://github.com/tinify/magento2-plugin/issues)[1 PRs](https://github.com/tinify/magento2-plugin/pulls)MITPHPPHP &gt;=5.5.0

Since Jan 15Pushed 3y ago12 watchersCompare

[ Source](https://github.com/tinify/magento2-plugin)[ Packagist](https://packagist.org/packages/tinify/magento2)[ Docs](https://tinify.com/developers)[ RSS](/packages/tinify-magento2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (5)Used By (0)

[![Build Status](https://camo.githubusercontent.com/a238929f05702775082ad23bd58ed7337d9fab55aca8cb6f13504ebc917f2d70/68747470733a2f2f7472617669732d63692e6f72672f74696e6966792f6d6167656e746f322d706c7567696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tinify/magento2-plugin)

Compress JPEG &amp; PNG images for Magento 2
============================================

[](#compress-jpeg--png-images-for-magento-2)

Make your Magento 2 store faster by compressing your JPEG and PNG images.

This plugin automatically optimizes your images by integrating with the popular image compression services TinyJPG and TinyPNG. Learn more about these services on .

***Important notice: Magento 2.1.6 includes a different way of generating product images in the cache folder. Magento reports many users with issues in that images are not showing and have posted a notice in their [2.1.6 release notes](http://devdocs.magento.com/guides/v2.1/release-notes/ReleaseNotes2.1.6CE.html#catalog)along with 2 solutions. Be warned when flushing the image cache in Magento 2.1.6: you will most likely need to regenerate a lot of missing images in the cache again afterwards with the catalog:images:resize script and this will take a lot of time. For fresh installs of this extension we recommend you temporarily suspend optimization when regenerating the cache. This can be done by setting the 4 image sizes to “No” on the configuration screen. Afterwards you can set the image sizes back to "Yes" to reenable image optimization for normal operation.***

Do you use Magento 1? Download the extension for [Magento 1 Community Edition](https://www.magentocommerce.com/magento-connect/compress-jpeg-png-images.html)or [Magento 1 Enterprise Edition](https://tig.nl/image-optimization-magento-extension-enterprise-edition/) instead.

How does it work?
-----------------

[](#how-does-it-work)

When you view a product in your webshop, Magento creates different image sizes in its cache folders. This extension will compress these images for you automatically. Any image sizes that are exact duplicates of each other will only be compressed once.

Your product images are uploaded to the TinyJPG or TinyPNG service and analyzed to apply the best possible compression. Based on the content of the image an optimal strategy is chosen. The result is sent back to your Magento webshop and saved in your public media folder.

On average JPEG images are compressed by 40-60% and PNG images by 50-80% without visible loss in quality. Your webshop will load faster for your visitors, and you’ll save storage space and bandwidth!

Screenshot
----------

[](#screenshot)

Example of plugin configuration in Magento 2:

[![Compress JPEG & PNG images configuration screen](https://raw.githubusercontent.com/tinify/magento2-plugin/screenshots/magento2-config.jpg)](https://raw.githubusercontent.com/tinify/magento2-plugin/screenshots/magento2-config.jpg)

Getting started
---------------

[](#getting-started)

Obtain your free API key from . The first 500 compressions per month are completely free, no strings attached! As each product will be shown in different sizes, between 50 and 100 products can be uploaded to your Magento webshop and compressed for free. You can also change which of types of image sizes should be compressed.

If you’re a heavy user, you can compress additional images for a small additional fee per image by upgrading your account. You can keep track of the amount of compressions in the Magento 2 configuration section.

Installation
------------

[](#installation)

The Magento 2 module can be installed with Composer (). Once the new Magento 2 Marketplace is lauched, it will also be featured there.

From the command line, do the following in your Magento 2 installation directory:

```
composer require tinify/magento2
php bin/magento setup:upgrade

```

Contact us
----------

[](#contact-us)

Got questions or feedback? Let us know! Contact us at .

Information for plugin contributors
-----------------------------------

[](#information-for-plugin-contributors)

### Prerequisites

[](#prerequisites)

- PHP 5.5 or newer.
- MySQL 5.6 or newer (integration tests).
- Composer ().

### Running the unit tests

[](#running-the-unit-tests)

```
composer install
vendor/bin/phpunit

```

### Installing development version of plugin

[](#installing-development-version-of-plugin)

Make sure to set `"minimum-stability": "dev"` in `composer.json` before you start.

```
composer config repositories.tinify vcs https://github.com/tinify/magento2-plugin
composer require tinify/magento2:dev-master
bin/magento setup:upgrade

```

License
-------

[](#license)

This software is licensed under the MIT License. [View the license](LICENSE).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~320 days

Total

4

Last Release

2813d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/939ff1539f12a7b07ffea69bd6d1654bd226877154315a564686106c0aed6b2c?d=identicon)[tinify](/maintainers/tinify)

---

Top Contributors

[![rolftimmermans](https://avatars.githubusercontent.com/u/78237?v=4)](https://github.com/rolftimmermans "rolftimmermans (55 commits)")

---

Tags

magento2magento2-extensionpagespeedseo-optimizationpluginapimagentocompressimagesmodulemagento2tinypngtinyjpgtinify

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/tinify-magento2/health.svg)

```
[![Health](https://phpackages.com/badges/tinify-magento2/health.svg)](https://phpackages.com/packages/tinify-magento2)
```

###  Alternatives

[tinify/tinify

PHP client for the Tinify API. Tinify compresses your images intelligently. Read more at https://tinify.com.

2515.2M71](/packages/tinify-tinify)[shortpixel/shortpixel-php

ShortPixel PHP SDK. Read more at https://shortpixel.com/api-tools

37531.5k10](/packages/shortpixel-shortpixel-php)[imaginaerum/magento2-language-fr-fr

Magento2 French Language Pack (fr\_FR)

41738.1k2](/packages/imaginaerum-magento2-language-fr-fr)[opengento/composer-registration-plugin

This plugin allows to compile the Magento2 components registrations on composer install/update.

111.6k](/packages/opengento-composer-registration-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
