kamsar / Dianoga

An automatic image optimizer for the Sitecore media library.
Other
104 stars 45 forks source link

Allow path exclusion based on wildcards #37

Closed michaellwest closed 4 years ago

michaellwest commented 6 years ago

In my example, SXA generates optimized-min items. Would like to exclude those by name like the following:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <dianogaOptimize>
        <processor type="Dianoga.Processors.Pipelines.DianogaOptimize.PathExclusion, Dianoga">
          <paths hint="list:AddExclusion">
            <path>*/scripts/optimized-min</path>
            <path>*/styles/optimized-min</path>
          </paths>
        </processor>
      </dianogaOptimize>
    </pipelines>
  </sitecore>
</configuration>
markgibbons25 commented 4 years ago

This is not a bad idea as I can think of some other use cases, for this example I've just been adding /Themes and /Base-Themes to the path exclusion, but for the case where there are also images in those paths then this will be better.

markgibbons25 commented 4 years ago

Done, please see 5.0.0 RC1