MainWP Blog

Tips & Tricks
Sebastian Moran

Useful Code Snippets for the ShortPixel Image Optimizer

ShortPixel is a well-used plugin for image optimization on sites. The plugin includes a number of filters and constants. You can hide your ShortPixel API key from the plugin’s settings by defining the API key in a constant in the sites wp-config.php file. Replace out the APIKEY with your actual API key for ShortPixel. define(‘SHORTPIXEL_API_KEY’, ‘APIKEY’); define(‘SHORTPIXEL_HIDE_API_KEY’, true); If you are using the ShortPixel plugin and service on sites which are hosted on FlyWheel then you might run into an error saying that flock (file locking) has been disabled for security reasons by using this constant in your sites wp-config.php

Looking for something?

Privacy laws apply to businesses that collect personal information. Since no personal information is collected by the MainWP plugins, no privacy laws apply to the MainWP plugins. This includes GDPR, UK DPA 2018, PIPEDA, Australia Privacy Act 1988, LGPD, PIPL, and other privacy laws.
Donata Stroink-Skillrud
Donata Stroink-Skillrud
President of Agency Attorneys

Your Download Is Just One Click Away

…or just download the plugin.

By entering your email, you agree to our Terms of Service and Privacy Policy.