Exclude an image from being optimized when using Autoptimize

When using Autoptimize plugin with image optimization provided by ShortPixel you can exclude one or more images from being optimized and served from ShortPixel CDN like this:

  1. Install a code snippet plugin like this one
  2. add the code snippet below
    function imgopt_excl() {
    return 'some-image.png, another-image.jpg';

The returned string is a comma-separated list of to be excluded images, and can be an exact filename or a full path or part of the path.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us