Is the GetCustomImage method obtained when the button is in the quick access panel? If so, then it should not be too difficult to do what you ask. You just need to know if the button is in the ribbon or QAT
BUT
, , , . 1 1 , .
, , 2 . buttonNormal . , , , . , .
<group id="MyGroup">
<button id="buttonLarge" size="large" image="largeImage" label="Test" getVisible="GetIsLargeButtonVisible"/>
<button id="buttonNormal" size="normal" image="normalImage" label="Test" getVisible="GetIsNormalButtonVisible"/>
</group>
GetIsNormalButtonVisible GetIsLargeButtonVisible , .