adapt image size to post size