Add kaminari gem for pagination.  Add condition for image creation that makes sure image object is only created when an image file is attached.