Get images only if parent status is publish

As probably there is not so many unpublished posts with images, You could exclude them from Your WP_Query, adding:

'post_parent' => '-12,-34,-56'

this would add overhead of only one query grabbing id’s of these posts