A freemium, easy to use, comprehensive, stable and frequently updated image compression plugin supported by the friendly team that created it. 🙂
Increase your website’s SEO ranking, number of visitors and ultimately your sales by optimising any image or PDF document on your website.
ShortPixel is an easy to use, lightweight, install-and-forget-about-it image optimization plugin that can compress all your past images and PDF documents with a single click. New images are automatically resized/rescaled and optimized on the fly, in the background. It’s also compatible with any gallery, slider or ecommerce plugin.
Short Pixel uses minimal resources and works well with any shared, cloud, VPS or dedicated web hosting. It can optimize any image you have on your website even the images that aren’t listed in Media Library like those in galleries like NextGEN, Modula or added directly via FTP!
Both lossy and lossless image compression are available for the most common image types (JPG, PNG, GIF, WebP and AVIF) plus PDF files.
We also offer glossy JPEG compression which is a very high quality lossy optimization algorithm. Specially designed for photographers!
Optimized images mean better user experience, better PageSpeed Insights or GTmetrix results, better Google PageRank and more visitors.
Why is ShortPixel the best choice when it comes to image optimization or PDF compression?
- popular plugin with over 300,000 active installations – according to WordPress
- compress JPG (and its variations JPEG, JPEG 2000, JPEG XR), PNG, GIF (still or animated) images and also PDF documents
- option to convert any JPEG, PNG or GIF (even animated ones!) to WebP and AVIF for more Google love. How to enable WebP?. What is AVIF and why is it good?.
- option to automatically convert PNG to JPG if that will result in smaller images. Ideal for large images in PNG format
- option to include the next generation images (WebP and AVIF) into the front-end pages by using the
<picture>tag instead of
<img>, independent from generating them through the plugin
- compatible with WP Retina 2x – all retina images are automatically compressed. How to benefit from Retina displays?
- optimize thumbnails as well as featured images. You can also select individual thumbnails to exclude from optimization
- ability to optimize any image on your site including images in NextGEN Gallery and any other image galleries or sliders
- option to scale images down, with 2 different options, which is very useful to automatically resize large images. This applies to the featured images and there is no need for additional plugins like Imsanity
- CMYK to RGB conversion
- skip already optimized images
- 24h stellar support (24/7) directly from developers.
- easily test lossy/glossy/lossless versions of the images with a single click in your Media Library
- great for photographers: keep or remove EXIF data from your images, compress photos with lossless option
- works well with both HTTPS and HTTP websites
- uses progressive JPEG for larger images in order to speed up the image display
- you can run ShortPixel plugin on multiple websites or on a multisite with a single API Key
- it is safe to test and use the plugin: all the original images are by default saved in a local backup that can be restored with a click, either one by one or in bulk
- ‘Bulk’ optimize all the existing images in Media Library or in any gallery with one click
- works great for eCommerce websites using WooCommerce or other plugins
- works great with NextGEN gallery, Foo Gallery and any other galleries and sliders
- compatible with WP Engine hosted websites and all the major hosting providers
- compatible with WPML and WPML Media plugins
- no file size limit
- integrates with Gravity Forms post_image field type optimizing the images upon upload
- compatible with watermarking plugins
- option to deactivate auto-optimizing images on upload
- no credits are used for the images that are optimised less that 5%
- direct integration with CloudFlare, either by using an API Key or a Token
- 30 days optimization report with all image details and overall statistics
- We are GDPR compliant! Read more.
- free optimization credits for non-profits, contact us for details
How much does it cost?
ShortPixel comes with 100 free credits/month and additional credits can be bought for as little as $4.99 for 5,000 image credits.
Check out our prices.
★★★★★ A Super Plugin works very well 62% reduction overall. robertvarns
★★★★★ The secret sauce for a WordPress website. mark1mark
★★★★★ A must have plugin, great support! ElColo13
★★★★★ Excellent Plugin! Even Better Customer Service! scaliendo
★★★★★ Great image compression, solid plugin, equally great support. matters1959
Help us spread the word by recommending ShortPixel to your friends and collect 100 lifetime monthly additional image credits for each referred active user. Make money by promoting a great plugin with our 30% commission affiliate program.
Other plugins by ShortPixel
- Image optimization & CDN on the fly – ShortPixel Adaptive Images
- Easily replace images or files in Media Library – Enable Media Replace
- Regenerate thumbnails plugin compatible with the other ShortPixel plugins – reGenerate Thumbnails Advanced
- Make sure you don’t have huge images in your Media Library – Resize Image After Upload
Get in touch!
- Email https://shortpixel.com/contact
- Twitter https://twitter.com/shortpixel
- Facebook https://www.facebook.com/ShortPixel
- LinkedIn https://www.linkedin.com/company/shortpixel
Actions and Filters for Developers
The ShortPixel Image Optimiser plugin calls the following actions and filters:
do_action( 'shortpixel_image_optimised', $post_id );
upon successful optimization;
before restoring an image from backup;
after succesful restore;
apply_filters("shortpixel_backup_folder", $backup_folder, $main_file_path, $sizes);
just before returning the ShortPixel backup folder, usually /wp-content/uploads/ShortpixelBackups. The
$sizes are the sizes array from metadata;
apply_filters('shortpixel_image_exists', file_exists($path), $path, $post_id);
post ID is not always set, only if it’s an image from Media Library;
apply_filters('shortpixel_image_urls', $URLs, $post_id);
filters the URLs that will be sent to optimisation,
$URLs is a plain array;
$chunk is the value ShortPixel chooses to use as number of selected records in one query (based on total table size), some hosts work better with a different value;
apply_filters('shortpixel/backup/paths', $PATHs, $mainPath);
filters the array of paths of the images sent for backup and can be used to exclude certain paths/images/thumbs from being backed up, based on the image path.
$mainPath is the path of the main image, while
$PATHs is an array with all files to be backed up (including thumbnails);
filters the array (
$sizes) of image sizes which can be excluded from processing (displayed in the plugin Advanced settings).
In order to define custom thumbnails to be picked up by the optimization you have two options, both comma separated defines:
will handle custom thumbnails like image-100x100_tl.jpg;
will handle custom thumbnails like image-uae-100×100.jpg;
will tell the plugin to create double extensions for the WebP image counterparts, for example image.jpg.webp for image.jpg;
don’t use flock queue, only activate this when you have
flock() denied errors on your installation;
adds timestamps to URLS, to prevent hitting the cache. Useful for persistent caches.
Hide the Cloudflare settings by defining these constants in wp-config.php:
define('SHORTPIXEL_CFTOKEN', 'the Cloudflare API token that has Purge Cache right'); define('SHORTPIXEL_CFZONE', 'The Zone ID from the domain settings in Cloudflare');
Hide the WSO banner in the settings by defining this constant in wp-config.php:
Alternatively, you can use this filter in your theme’s functions.php file: