View Categories

ShortPixel Adaptive Images settings – Exclusions

  • Excluded selectors: here you can write the CSS selectors you want SPAI to exclude from optimization.
    • If you write them in “Don’t lazy load”, such selectors won’t be lazy loaded, but they will still be optimized and resized. Please notice that any images not lazy loaded will not be delivered as WebP/AVIF for technical reasons.
    • If you write them in “Don’t resize”, SPAI will optimize such images but not resize them.
    • If you write them in “Leave out completely”, SPAI will completely ignore them, no optimization nor resizing.
  • Excluded URLs: if you want SPAI to ignore some of your images by URL, this is where you exclude them, using regular expressions (to exclude all GIFs or all PNGs, for example) or paths (to exclude a single image, for example). The plugin includes already a good explanation on how to use this field, make sure to check it out!
  • Excluded pages: the same way image URLs can be excluded, you can also exclude page URLs so the plugin will completely stop working on those pages you choose. Here you can also use regular expressions as well as paths.

Be sure to read more about exclusions here: How to exclude images from optimization in the ShortPixel Adaptive Images plugin