Moved image processing to server side