Is there a way to target only images within the loop?

That depends.

There is the_post_thumbnail which will echo the “featured” image and get_children can grab all attachments.

Certain kinds of images aren’t attached though, so you can’t easily get those.

Reference

http://codex.wordpress.org/Function_Reference/the_post_thumbnail
http://codex.wordpress.org/Function_Reference/get_children

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)