calculate html bg based on the featured image