added support for taking the first image in post to be able to used in the template