title: Adding filter to pattern image of shape in fabric.js
body: <p>I am trying to apply a filter to the pattern image of shape but receiving numerous errors. I googled a lot but still cannot find a solution that works. Below is my code. Q 1. Is it even possible? Q 2. How to achieve it!?</p>
  
  <pre><code>    var canvas = new fabric.Canvas('c1');
  
      var circle = new fabric.Circle({
      radius: 100, fill: 'green', left: 100, top: 100
      });
  
      canvas.add(circle);
  
      loadPattern('http://i0.wp.com/www.illustratoring.com/wp-content/uploads/2012/12/chevron-pattern-illustrator.png?resize=40%2C40', circle);
  
      function loadPattern(url, obj){
      fabric.util.loadImage(url, function(img) {
        obj.setPatternFill({
              source: img,
              repeat: 'repeat'
        });
        canvas.renderAll();
     });
        }
  </code></pre>
  
  <p>here is the JSfilddle <a href="https://jsfiddle.net/eepmzy9n/2/" rel="nofollow">https://jsfiddle.net/eepmzy9n/2/</a> I want to apply filters to the pattern image.</p>