how do i display only assigned to the product attribute value?
im using https://github.com/witrin/magento-attribute-option-image/ and trying to get on product view page image and thumbnail of attribute by using this code 

    $_product = $this->getProduct();
    $_attribute = $_product->getResource()->getAttribute('color');
    $_options = $_attribute->getSource()->getAllOptions(false);
    
    foreach ($_options as $_option) {
        echo $_option['image'];
        echo $_option['thumbnail'];
    }
so it shows me all options of that attribute and not the assigned to product 

how do i display only assigned to the product value of the attribute?

I would really appreciate any help!
how do i display only assigned to the product attribute value?
===

im using https://github.com/witrin/magento-attribute-option-image/ and trying to get on product view page image and thumbnail of attribute by using this code 

    $_product = $this->getProduct();
    $_attribute = $_product->getResource()->getAttribute('color');
    $_options = $_attribute->getSource()->getAllOptions(false);
    
    foreach ($_options as $_option) {
        echo $_option['image'];
        echo $_option['thumbnail'];
    }
so it shows me all options of that attribute and not the assigned to product 

how do i display only assigned to the product value of the attribute?

I would really appreciate any help!