Resizing large images before inserting them to redis