Let's add the way to use images in the layout of options.
For example, a user may add some of the data attributes to the options of the original selection field. Based on these attributes, the plugin adds some HTML block or style attribute to the resulting list. After that, the user can customize the appearance of these images using CSS properties.
<option value="apple" data-image="/images/apple.jpg">Apple</option>
I prefer to use theese images as a background image. But perhaps someone needs the iamge in the <img>
tag or in the some additional HTML block.
<li rel="apple" style="background-image:url('/images/apple.jpg');">Apple</li>
<li rel="apple">
<img class="custom-select__image" src="/images/apple.jpg" />
Apple
</li>
<li rel="apple">
<div class="icon-box">
<div class="icon-box__image" src="/images/apple.jpg"></div>
</div>
Apple
</li>