Title: Takopic – Local Image Optimizer | Convert WebP &amp; AVIF
Author: Clément Gayot
Published: <strong>November 8, 2026</strong>
Last modified: November 8, 2026

---

Search plugins

![](https://ps.w.org/takopic/assets/banner-772x250.png?rev=3791227)

![](https://ps.w.org/takopic/assets/icon-256x256.gif?rev=3791227)

# Takopic – Local Image Optimizer | Convert WebP & AVIF

 By [Clément Gayot](https://profiles.wordpress.org/striffly/)

[Download](https://downloads.wordpress.org/plugin/takopic.1.0.1.zip)

 * [Details](https://wordpress.org/plugins/takopic/#description)
 * [Reviews](https://wordpress.org/plugins/takopic/#reviews)
 *  [Installation](https://wordpress.org/plugins/takopic/#installation)
 * [Development](https://wordpress.org/plugins/takopic/#developers)

 [Support](https://wordpress.org/support/plugin/takopic/)

## Description

[GitHub](https://github.com/Striffly/takopic) | [Documentation](https://github.com/Striffly/takopic#readme)
| [Changelog](https://github.com/Striffly/takopic/blob/main/CHANGELOG.md) | [Support](https://github.com/Striffly/takopic/issues)

Takopic optimises the images of your media library with the libraries of your own
server: `jpegoptim`, `optipng` or `oxipng`, `pngquant`, `cwebp` and `avifenc`, or
GD and Imagick for the WebP and AVIF formats. Free and unlimited, no API key, no
quota: your images never leave your server.

#### Optimisation

 * Compresses JPG and PNG images in place, and creates their WebP and AVIF versions,
   kept only when lighter.
 * Keeps the original images, to restore them at any time.
 * Strips the metadata (camera, date, GPS position), but keeps the colour profile
   when the colours need it.
 * Handles CMYK JPGs and the photos stored sideways.

#### Media library

 * Optimises the images on upload, or the whole library in the background, with 
   pause and cancel.
 * Re-optimises the images left behind by new settings or new image sizes of the
   theme.
 * Shows the status, the errors and the bytes saved of each image, and optimises
   or restores it in one click.

#### On the site

 * Serves AVIF and WebP with the JPG or PNG as fallback: in a `<picture>` element,
   or from the server with rewrite rules (Apache, nginx).
 * Tests the delivery.

#### For developers

 * `takopic_image()` and `takopic_image_sources()` give the `<picture>` of an image
   or its srcsets, in your own templates.
 * WP-CLI: `wp takopic run`, `clean`, `restore`, `stats` and `health`.
 * Filters for the folder of the originals, the priority and threads of the libraries,
   the pace of the background jobs and the path of a library.

All of them are documented in the [README on GitHub](https://github.com/Striffly/takopic#-developers).

### Privacy

 * **No external request**: no API, no tracking. The delivery test only requests
   the images of the site, from its CDN if they are served by one.
 * **No metadata**: the optimised images lose it, GPS position included. The originals
   keep it.
 * **Private originals**: kept in `uploads/takopic/originals-{key}/`, under a key
   drawn at random for each site. Takopic closes the folder to the web with a `.
   htaccess` on Apache and LiteSpeed; on nginx, add the rules of the Delivery tab.`
   Test the delivery` checks it on both.
 * **Originals out of the web root**: set their folder with the `takopic_backup_dir`
   filter, before optimising any image. Takopic does not move the originals already
   kept: move the folder yourself when you change it.

### Credits

Takopic is developed by [Clément Gayot](https://github.com/Striffly).

It started as a fork of [Squidge](https://github.com/ainsleyclark/squidge), created
by [Ainsley Clark](https://github.com/ainsleyclark) in 2021 with contributions from
Roman K, Rohinish and karbivskij, and was largely rewritten in 2026. Many thanks
to them for the foundations: the idea of relying on the native libraries of the 
server comes from Squidge.

Thanks also to [Media Optimizer](https://wordpress.org/plugins/yoohw-media-optimizer/)
by YooHW for some ideas: the menu, the delivery page, the display of the bytes saved,
and more.

## Screenshots

[⌊The overview: the bytes saved, the status of the images and the libraries of each
format.⌉⌊The overview: the bytes saved, the status of the images and the libraries
of each format.⌉[

The overview: the bytes saved, the status of the images and the libraries of each
format.

[⌊The optimisation of the media library in the background, with its progress.⌉⌊The
optimisation of the media library in the background, with its progress.⌉[

The optimisation of the media library in the background, with its progress.

[⌊The delivery of WebP and AVIF on the site, and its test.⌉⌊The delivery of WebP
and AVIF on the site, and its test.⌉[

The delivery of WebP and AVIF on the site, and its test.

[⌊The settings of each format: quality, compression, library.⌉⌊The settings of each
format: quality, compression, library.⌉[

The settings of each format: quality, compression, library.

[⌊The status and the bytes saved of each image, in the media library.⌉⌊The status
and the bytes saved of each image, in the media library.⌉[

The status and the bytes saved of each image, in the media library.

## Installation

In `Plugins > Add New Plugin`, search for Takopic, then install and activate it.

After installing:

 * **The new uploads** are optimised right away: `Optimise new uploads`, ticked 
   by default.
 * **The images already in the library** wait in the Optimise tab: `Optimise new
   images` optimises them in the background.
 * **The Overview tab** lists the missing libraries, and how to install them.
 * **WebP and AVIF are not served** until you turn them on in the Delivery tab.

Takopic needs PHP allowed to run the libraries of the server (`proc_open()` or `
exec()`):

 * JPG: `jpegoptim`. Without it, not compressed.
 * PNG: `optipng` or `oxipng` (faster). Without them, not compressed.
 * PNG lossy (optional): `pngquant`. Without it, lossless only.
 * WebP: `cwebp`. Without it, GD or Imagick, with heavier PNG graphics.
 * AVIF: `avifenc`. Without it, GD or Imagick (WordPress 6.5+), with less sharp 
   colours.

On Debian or Ubuntu: `sudo apt install jpegoptim optipng webp libavif-bin`.

On Windows: no JPG and PNG compression. For WebP and AVIF, put the official builds
of [`cwebp`](https://developers.google.com/speed/webp/download) and [`avifenc`](https://github.com/AOMediaCodec/libavif/releases)
on the `PATH`, or set their path with the `takopic_binary_path` filter.

## FAQ

### Does Takopic replace my images?

By default, yes: the JPG and PNG files are replaced by their compressed version,
and the originals are kept in `uploads/takopic/originals-{key}/`. `Restore original
images` on the settings page, or `Restore original` on an image of the media library,
puts them back. To only make the WebP and AVIF versions, untick `Compress JPG images`
and `Compress PNG images` on the Settings tab.

### Does it serve WebP and AVIF automatically?

Once turned on in the Delivery tab, in one of two ways:

 * **In the HTML**: the images of the content and of `wp_get_attachment_image()`(
   featured images, galleries, most themes) are wrapped in a `<picture>` element,
   with the JPG or PNG as fallback. Works everywhere, but may break a layout styling`
   img` directly. In a custom theme, use [`takopic_image()`](https://github.com/Striffly/takopic#theme-development).
 * **From the server**: the server answers `photo.jpg` with its AVIF or WebP version
   when the browser reads it. The HTML does not change, and CSS backgrounds are 
   served too. Takopic writes the rules in `uploads/.htaccess` on Apache and LiteSpeed;
   on nginx, add the ones given on the Delivery tab, or in the [README](https://github.com/Striffly/takopic#-faq).

A CDN must vary its cache on the `Accept` header, or serve the JPG to everyone. `
Test the delivery` checks what the server sends.

### What happens when the theme changes its image sizes?

Its images are listed as “Older settings”: `Re-optimise outdated images` makes their
thumbnails again from the originals, and optimises them.

### Does it slow the site down?

The background jobs run the libraries at the lowest priority, behind the requests
of the site. On a small server, the [filters](https://github.com/Striffly/takopic#filters)
slow them down further.

### Does it work on shared hosting?

Yes for WebP and AVIF, made by GD or Imagick when the libraries are missing. The
JPG and PNG compression needs the libraries, which most shared hosts do not let 
you install: ask your host. The Overview tab tells what is missing.

### What happens when I deactivate or delete Takopic?

Deactivated, Takopic stops its background job and removes its rewrite rules: the
site serves the JPG and PNG images again. Its settings and files stay, and the rules
come back on activation.

Deleted, Takopic removes its settings and data from the database, but leaves the
files: the compressed images, their WebP and AVIF versions and the originals. To
get the originals back, run `Restore original images` before deleting it.

Before deactivating, a dialog shows how many images Takopic has optimised and the
size of `uploads/takopic/`, with a button to restore the originals, and warns when
the theme calls `takopic_image()`: its pages break while Takopic is deactivated.
With nothing to warn about, Takopic deactivates at once.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Takopic – Local Image Optimizer | Convert WebP & AVIF” is open source software.
The following people have contributed to this plugin.

Contributors

 *   [ Clément Gayot ](https://profiles.wordpress.org/striffly/)

[Translate “Takopic – Local Image Optimizer | Convert WebP & AVIF” into your language.](https://translate.wordpress.org/projects/wp-plugins/takopic)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/takopic/), check out
the [SVN repository](https://plugins.svn.wordpress.org/takopic/), or subscribe to
the [development log](https://plugins.trac.wordpress.org/log/takopic/) by [RSS](https://plugins.trac.wordpress.org/log/takopic/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.1

 * Images no longer listed as “Older settings” for a thumbnail size a plugin registers
   but never makes: `Re-optimise outdated images` puts them back as optimised, without
   encoding them again.
 * WP-CLI prints its welcome first, even when the theme or a plugin holds the output
   back.
 * `wp takopic run` numbers the images it processes, with their ID, e.g. `Processing
   image 10/256: Sunset (ID 147)`.
 * The counts of the images stay right with a persistent object cache that missed
   a change made elsewhere, e.g. by WP-CLI.
 * The numbers the settings page updates are written as WordPress writes them, e.
   g. `1 044` in French, not `1,044`.

The older versions, and those of Squidge before Takopic, are in the [full changelog](https://github.com/Striffly/takopic/blob/main/CHANGELOG.md).

## Meta

 *  Version **1.0.1**
 *  Last updated **19 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.2 or higher **
 *  Tested up to **7.1.4**
 *  PHP version ** 8.2 or higher **
 * Tags
 * [AVIF](https://wordpress.org/plugins/tags/avif/)[compress images](https://wordpress.org/plugins/tags/compress-images/)
   [image optimization](https://wordpress.org/plugins/tags/image-optimization/)[performance](https://wordpress.org/plugins/tags/performance/)
   [webp](https://wordpress.org/plugins/tags/webp/)
 *  [Advanced View](https://wordpress.org/plugins/takopic/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/takopic/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/takopic/reviews/)

## Contributors

 *   [ Clément Gayot ](https://profiles.wordpress.org/striffly/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/takopic/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://github.com/Striffly/takopic#-support)