title: How to add an image in Select2 options?
body: <p>I have a select: <br></p>
  
  <pre><code>&lt;select data-bind="options : PeriodeOptions, optionsValue : 'Periode', 
  optionsText : function(item) { return AddLock(item)}" id="SelectPeriode"&gt;&lt;/select&gt;
  </code></pre>
  
  <p><br> And I have my fucntion; <br></p>
  
  <pre><code>//am - Fonction permettant d'ajouter le cadenas à côté de la Periode si elle est cloturée
          function AddLock(pItem) {
              if (!pItem.IsCloturePeriode)
                  return pItem.Periode;
              var lTemplate = $('&lt;span&gt;' + pItem.Periode + '&lt;img src="/Ressources/Images/Locked.png"/&gt;&lt;/span&gt;');
              return lTemplate;
          };
  </code></pre>
  
  <p><br> It sends me an object: <a href="https://i.stack.imgur.com/BJGKQ.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/BJGKQ.jpg" alt="enter image description here"></a><br> Please help!</p>