How to call Shopify metafields for a variant in .js?

Is there any way to call metafields image positions in variants? It works fine in liquid obviously, but I have one function which needs the data as well, but can only be loaded from javascript. I don’t have a problem getting variant.id or featured_image, however metafields I just don’t know what to do.
The liquid code (simplified) which fetches image positions is:

                      {%- for variant in product.variants -%}
                    <option data-image-positions="{{variant.metafields.variant.image_position}}">
                    </option>
                  {%- endfor -%}

Would appreciate some pointers.