include a function in /index and /archive to fetch the first image attachment if no featured image is set