The following snippet will let you show images from post or page attachments in WordPress.

Snippet Source/Credit: WP-Snippets.com