[IMAGE DATA] is a place holder representing the normal image output in your themes code that you wrap with the given logic.
What that code is varies wildly by theme
The other approach is to look for the image loop and skip images used with variants with the {%-continue -%} tag
{% for image in product.images offset:index_offset %}
{%- if image.attached_to_variant == true -%}
{%- continue -%}
{%- endif -%}
...
....