added method to resize main image