### Magento 2 - Get Attribute Options
```
<?php
$attribute_value = $_product->getData( $attributeCode );
$optionText = $attr->getSource()->getOptionText( $attribute_value );
//the id of the row that has our image
$option_img_id = $attribute_value;
//get all of the options - if we need to find all images
/*
$swatch_option_ids = array();
$options = $attr->getSource()->getAllOptions(false);
foreach($options as $option){
$swatch_option_ids[] = $option['value'];
}
$swatch_option_ids = implode(',', $swatch_option_ids );
*/
```