title: jQuery Image Picker - Select multiple images programmatically
body: <p>I'm using the jQuery library Image Picker
  <a href="https://rvera.github.io/image-picker/" rel="nofollow noreferrer">https://rvera.github.io/image-picker/</a></p>
  
  <p>Let's pretend I have the same setup like that:</p>
  
  <pre><code>&lt;select class="image-picker" multiple="multiple"&gt;
      &lt;option data-img-src="http://placekitten.com/220/200" value="1"&gt;Cute Kitten 1&lt;/option&gt;
      &lt;option data-img-src="http://placekitten.com/180/200" value="2"&gt;Cute Kitten 2&lt;/option&gt;
      &lt;option data-img-src="http://placekitten.com/130/200" value="3"&gt;Cute Kitten 3&lt;/option&gt;
      &lt;option data-img-src="http://placekitten.com/270/200" value="4"&gt;Cute Kitten 4&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I can select a single image programmatically like that</p>
  
  <pre><code>$(".image-picker").val("1");
  $(".image-picker").data('picker').sync_picker_with_select();
  </code></pre>
  
  <p>In this case the first image would be selected. What if I ant to select the image with value 1 and 4? I have tried that:</p>
  
  <pre><code>$(".image-picker").val(["1","4"]);
  $(".image-picker").data('picker').sync_picker_with_select();
  </code></pre>
  
  <p>but this doesn't work.</p>
  
  <p>Any help would be much appreciated.</p>