Leadimage from internal images or first image in text body

Have fun, see also these posts for reference: