add the code to allow scale image to switch depending on length of the rant