Added image resize support