code: function(element) {
  
              var parent = element.parentNode;
  
              // If input already have parent just pass through
              if (parent.tagName.toLowerCase() === 'i' && parent.classList.contains('waves-effect')) {
                  return;
              }
  
              // Put element as child
              var wrapper  = document.createElement('i');
              parent.replaceChild(wrapper, element);
              wrapper.appendChild(element);
  
          }
docs: Wrap <img> tag so it can perform the effect