ANK STUDIO · KNOWLEDGE BASE

Image compression for WordPress

User guide for the ANK Image Compress WordPress plugin

The plugin compresses Media Library images through the ANK API. This guide covers setup, automatic and bulk processing, WebP/AVIF sizes, backups and troubleshooting.

1. What the plugin does

ANK Image Compress processes original JPEG, PNG and WebP files and the WordPress image sizes you select. It checks the API response, image format, dimensions and size reduction before replacing a file. Compressed files keep their names and URLs. The original bytes are backed up privately outside the website.

You can process new uploads automatically, compress one image, selected images or the entire library, search by title or filename, browse 50 results per page, review savings and restore an original.

2. Installation and API key

  1. Install the ANK Image Compress ZIP through Plugins → Add New → Upload Plugin, then activate it.
  2. Create an account at ankpicpress.com and obtain an API key in your account. Your credentials and balance are shared with ank-tinypng.ru; browser sign-in is separate for each domain.
  3. Open Settings → ANK Compress in WordPress, enter the key and save the settings.
  4. Check API availability and your balance in the Connection panel. A saved key is never displayed again.

On WordPress Multisite, you can define ANKIC_API_KEY in wp-config.php to use one key across the network. Keep that file private. When the constant is set, the key field cannot be edited in the admin panel.

3. Automatic processing

Enable “Process new images after upload using WP-Cron” under Settings → ANK Compress and save. WordPress queues the image shortly after upload. The admin page does not need to stay open, but WP-Cron must run from site traffic or a system cron job.

To check it, upload a small static JPEG, PNG or WebP. After cron runs, find it in the plugin table. “Done” means all eligible files were processed; the counter shows completed and available files. If nothing starts, check WP-Cron, the key and the credit balance.

4. Manual and bulk compression

For one image, click Compress in the plugin table or WordPress Media Library list view. You can also select several items in the Media Library and use its bulk action. “Process all images on this page” applies only to the current page of up to 50 images.

Use Start bulk optimization to process the entire library. WP-Cron handles one file per scheduled run and stores progress on the server. You can pause and resume. The completed and failed counts describe the current run. A later run skips versions already processed unless you explicitly choose recompression.

5. Image sizes, WebP and AVIF

Select which WordPress-generated sizes to send to the API. The original image is always processed. More selected sizes can mean more API requests. You may set maximum dimensions for new large JPEG and WebP uploads; 0 keeps WordPress defaults. WordPress does not resize PNG uploads with this setting.

The output-format setting creates newly generated sizes as WebP or AVIF using WordPress. Existing images and original files stay in their current format. WebP sizes may subsequently be compressed by the ANK API. AVIF sizes are encoded locally by WordPress and are not sent to the ANK API. The server image editor must support the chosen format.

6. Search, statistics and restore

Search by image title or filename and browse 50 results per page. The table shows processed file counts, bytes saved and status. The statistics panel totals optimized images, files and savings.

Restore original replaces compressed bytes with the private backup; Recompress starts a new pass. Check your balance before recompressing many files, as a new successful result may use a credit. WordPress needs write access to the parent directory of the installation to store backups outside the public website.

7. Credits and current limits

The current ANK API accepts static JPEG, PNG and WebP files up to 5 MB and 20 megapixels. If the API result is not smaller, the file is left intact and no credit is used. Repeated identical requests are protected against duplicate billing. Your balance appears in the Connection panel.

8. Troubleshooting and support

  • API unavailable or invalid key: Check Connection under Settings → ANK Compress, save a new key if needed, then reload.
  • Automatic processing does not start: Confirm the setting and actual WP-Cron execution. Upload a small JPEG and check its status.
  • Image skipped: Check its MIME type, 5 MB / 20 MP limits and animation. AVIF requires server editor support and is not compressed by the API.
  • Backup cannot be written: Give WordPress write access to the installation's parent directory. The plugin will not replace a file until a backup succeeds.
  • Browser shows an old image: Refresh page or CDN cache. The plugin versions URLs in standard WordPress output after replacement.

For persistent errors, email modules@ankpicpress.com with the plugin version, file type and size, error message and reproduction steps. Do not send your API key or private source images.

← All applications