I am using AJAX to call a controller method that returns the latest image from the table and I am returning JSON containing the image path to the success handle
success