Sergei-b84,
Все работает!
Тестируй в инструментах разработчика Google Chrome или Fierfox;
или
<select name="name" onchange="document.getElementById('image-picker').setAttribute('data-limit',this.value);">
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
</select>
<br>
<select class="image-picker show-html" id="image-picker" data-limit="0" multiple="multiple" style="width:369px;">
<option data-img-src="image-picker/images/01.png" value="2"> Page 2 </option>
<option data-img-src="image-picker/images/01.png" value="3"> Page 3 </option>
<option data-img-src="image-picker/images/01.png" value="12"> Page 12 </option>
</select><br>
<button onclick="alert(document.getElementById('image-picker').getAttribute('data-limit'))">тест</button>