Image resize and corresponding thumbnail generation working