Try to use the ajax call for your getimg() method and pass the ranking value as parameter and update your image source with Jquery..this solution will be easy for you..
OR
Create a
DTO for your template and map that value to the Expression in Repeater.