Filter to quit?
-
Need: A way to programmatically skip the compression process
If you have staging or local sites, you’re probably trying to keep databases sort of in sync. For me, I’m always pulling from upstream, and never pushing. This means all final changes to the database (new posts, image uploads, whatever) usually happen live.
That’s the only place I want compression to happen, because otherwise I’m doubling up on my compressions if I upload something locally playing around.
With a proper filter to skip the process, I could do something like:
if(WP_DEBUG == true) add_filter('tinypng_compress_images', '__return_false');
Or if you have environment detection set up or whatever one may choose.
- The topic ‘Filter to quit?’ is closed to new replies.